﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0062)http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html -->
<HTML><HEAD><TITLE>NHibernate的Session管理 - DDLLY命名空间 - 博客园</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content=NHibernate,NHibernate的Session管理 name=keywords><LINK 
href="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/common.css" type=text/css 
rel=stylesheet><LINK id=MainCss 
href="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/style.css" type=text/css 
rel=stylesheet><LINK 
href="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/common2.css" type=text/css 
rel=stylesheet><LINK 
href="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/shCore.css" type=text/css 
rel=stylesheet><LINK 
href="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/shThemeDefault.css" 
type=text/css rel=stylesheet><LINK 
href="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/customcss.css" type=text/css 
rel=stylesheet><LINK title=RSS href="http://www.cnblogs.com/renrenqq/rss" 
type=application/rss+xml rel=alternate><LINK title=RSD 
href="http://www.cnblogs.com/renrenqq/rsd.xml" type=application/rsd+xml 
rel=EditURI>
<SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/common.js" 
type=text/javascript></SCRIPT>

<SCRIPT 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/jquery.json-2.2.min.js" 
type=text/javascript></SCRIPT>

<META content="MSHTML 6.00.2900.5880" name=GENERATOR></HEAD>
<BODY>
<FORM id=Form1 name=Form1 action=467688.html method=post>
<DIV><INPUT id=__EVENTTARGET type=hidden name=__EVENTTARGET> <INPUT 
id=__EVENTARGUMENT type=hidden name=__EVENTARGUMENT> <INPUT 
id="&#13;&#10;__VIEWSTATE" type=hidden name=__VIEWSTATE> </DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</SCRIPT>
<!--done-->
<DIV id=header><!--done-->
<DIV class=header>
<DIV class=headerText><A class=headermaintitle id=Header1_HeaderTitle 
href="http://www.cnblogs.com/renrenqq/">DDLLY命名空间</A><BR>
<TABLE width="100%" border=0>
  <TBODY>
  <TR>
    <TD>&nbsp;&nbsp;DDLLY命名空间有两个类DDL和LLY</TD>
    <TD rowSpan=3>
      <SCRIPT type=text/javascript><!--
google_ad_client = "pub-3076718755126851";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
//--></SCRIPT>

      <SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/show_ads.js" 
      type=text/javascript>
</SCRIPT>
    </TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<DIV id=mytopmenu>
<DIV id=mylinks><!--done--><A class=menu id=MyLinks1_HomeLink 
href="http://www.cnblogs.com/">博客园</A>&nbsp;&nbsp; <A class=menu 
id=MyLinks1_MyHomeLink 
href="http://www.cnblogs.com/renrenqq/">首页</A>&nbsp;&nbsp; <A class=menu 
href="http://space.cnblogs.com/">社区</A>&nbsp;&nbsp; &nbsp;&nbsp; <A class=menu 
id=MyLinks1_ContactLink 
href="http://space.cnblogs.com/msg/send/DDL">联系</A>&nbsp;&nbsp; <A class=menu 
id=MyLinks1_Syndication href="http://www.cnblogs.com/renrenqq/rss">订阅</A><A 
id=MyLinks1_XMLLink href="http://www.cnblogs.com/renrenqq/rss"><IMG 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
alt=订阅 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/xml.gif"></A>&nbsp;&nbsp; <A 
class=menu id=MyLinks1_Admin 
href="http://www.cnblogs.com/renrenqq/admin/EditPosts.aspx">管理</A> </DIV>
<DIV id=mystats><!--done-->随笔-85&nbsp; 评论-927&nbsp; 文章-0&nbsp; trackbacks-56 
</DIV></DIV>
<DIV id=centercontent>
<DIV class=post>
<H1 class=postTitle><A class=postTitle2 id=ctl04_TitleUrl 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html">NHibernate的Session管理</A></H1><A 
title=代码下载 
href="http://files.cnblogs.com/renrenqq/Index.Data.NHibernateSessionStorage.rar">代码下载</A><BR><BR>看过hibernate文档的人应该看到在“<A 
title="第 1 章 在Tomcat中快速上手" 
href="http://www.hibernate.org/hib_docs/reference/zh-cn/html/quickstart.html">第 
1 章 在Tomcat中快速上手</A>”，可以看到代码中使用ThreadLocal作为Session的存放容器。<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">final</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ThreadLocal&nbsp;session&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">new</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ThreadLocal();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN></DIV><BR>查看<A title=JDK的文档 
href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ThreadLocal.html">JDK的文档</A>，这个东东作用是给每个线程提供单独的静态变量，在一个线程内部共享，而不同的线程间不共享。<BR><BR>在hibernate中Session 
是“单线程”的，即多个线程访问一个Session 
会出问题。所以在最普遍的做法是一个操作就创建一个新的Session。Session对应着一个数据库的连接，而且Session内部提供了缓存（一级缓存）的机制。这样做意味这更多的数据库连接次数和缓存资源的浪费。<BR><BR>hibernate中使用使用ThreadLocal的目的就是让Session在一个线程内共享，尽可能的较少连接数据库的次数和尽可能的使用到一级缓存。<BR><BR>对于NHibernate是否有实现的办法呢。我们找到了<SPAN 
id=nsrTitle>ThreadStaticAttribute </SPAN>，它指示静态字段的值对于每个线程都是唯一的。用法如下<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><SPAN 
style="COLOR: #000000">[ThreadStatic]<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;value;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN></DIV><BR>似乎这样就可以了。在WinFrom,控制台应用程序和类库等中的确是没有问题了。但在Asp.Net中问题可不这么简单。在Java里Jsp作为Servlet来运行，是单线程的。而Asp.Net就不一样了，他用到了多个线程，造成的情况是：＂当有多个线程的时候，ThreadStaticAttribute的变量被第一个线程初始化后，其它的线程访问到的都是null，而每个HttpRequest则可能有多个线程为其服务，因而有人称ThreadStatic 
is evil。＂（此段引用<A 
href="http://jiezhi.cnblogs.com/archive/2005/01/17/92004.aspx">在ASP.NET中使用NHibernate 
- 风满袖 - 
博客园</A>）。所以我们好的做法是使用HttpContext.Current.Items来共享session。使用HttpModule来处理之。在“<U><FONT 
color=#800080><A 
href="http://jiezhi.cnblogs.com/archive/2005/01/17/92004.aspx">在ASP.NET中使用NHibernate 
- 风满袖 - 
博客园</A></FONT></U>”里已经做了讲解。<BR><BR>我的想法是做一个统一的ISession提供者，只需要简单的配置即可用在不同的应用程序里。<BR><BR>储存ISession类需要实现的接口。<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
id=Codehighlighter1_0_46_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_0_46_Open_Text.style.display='none'; Codehighlighter1_0_46_Closed_Image.style.display='inline'; Codehighlighter1_0_46_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_0_46_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_0_46_Closed_Text.style.display='none'; Codehighlighter1_0_46_Open_Image.style.display='inline'; Codehighlighter1_0_46_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top><SPAN id=Codehighlighter1_0_46_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_0_46_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改日期：2005-10-05<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改人：DDL<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改原因：<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernate;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage<BR><IMG 
id=Codehighlighter1_113_489_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_113_489_Open_Text.style.display='none'; Codehighlighter1_113_489_Closed_Image.style.display='inline'; Codehighlighter1_113_489_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_113_489_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_113_489_Closed_Text.style.display='none'; Codehighlighter1_113_489_Open_Image.style.display='inline'; Codehighlighter1_113_489_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_113_489_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_113_489_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_119_171_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_119_171_Open_Text.style.display='none'; Codehighlighter1_119_171_Closed_Image.style.display='inline'; Codehighlighter1_119_171_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_119_171_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_119_171_Closed_Text.style.display='none'; Codehighlighter1_119_171_Open_Image.style.display='inline'; Codehighlighter1_119_171_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_119_171_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_119_171_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">储存一个ISession<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">interface</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionStorage<BR><IMG 
id=Codehighlighter1_213_487_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_213_487_Open_Text.style.display='none'; Codehighlighter1_213_487_Closed_Image.style.display='inline'; Codehighlighter1_213_487_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_213_487_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_213_487_Closed_Text.style.display='none'; Codehighlighter1_213_487_Open_Image.style.display='inline'; Codehighlighter1_213_487_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_213_487_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_213_487_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_223_314_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_223_314_Open_Text.style.display='none'; Codehighlighter1_223_314_Closed_Image.style.display='inline'; Codehighlighter1_223_314_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_223_314_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_223_314_Closed_Text.style.display='none'; Codehighlighter1_223_314_Open_Image.style.display='inline'; Codehighlighter1_223_314_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_223_314_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_223_314_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">获得ISession&nbsp;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;returns&gt;&lt;/returns&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ISession&nbsp;Get();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_348_448_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_348_448_Open_Text.style.display='none'; Codehighlighter1_348_448_Closed_Image.style.display='inline'; Codehighlighter1_348_448_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_348_448_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_348_448_Closed_Text.style.display='none'; Codehighlighter1_348_448_Open_Image.style.display='inline'; Codehighlighter1_348_448_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_348_448_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_348_448_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;保存ISession<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;param&nbsp;name="value"&gt;&lt;/param&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Set(ISession&nbsp;value);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN></DIV><BR>非Asp.Net程序使用的ISession提供者<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
id=Codehighlighter1_0_46_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_0_46_Open_Text.style.display='none'; Codehighlighter1_0_46_Closed_Image.style.display='inline'; Codehighlighter1_0_46_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_0_46_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_0_46_Closed_Text.style.display='none'; Codehighlighter1_0_46_Open_Image.style.display='inline'; Codehighlighter1_0_46_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top><SPAN id=Codehighlighter1_0_46_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_0_46_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改日期：2005-10-10<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改人：DDL<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改原因：<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;System;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernate;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage<BR><IMG 
id=Codehighlighter1_128_1008_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_128_1008_Open_Text.style.display='none'; Codehighlighter1_128_1008_Closed_Image.style.display='inline'; Codehighlighter1_128_1008_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_128_1008_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_128_1008_Closed_Text.style.display='none'; Codehighlighter1_128_1008_Open_Image.style.display='inline'; Codehighlighter1_128_1008_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_128_1008_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_128_1008_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_134_208_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_134_208_Open_Text.style.display='none'; Codehighlighter1_134_208_Closed_Image.style.display='inline'; Codehighlighter1_134_208_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_134_208_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_134_208_Closed_Text.style.display='none'; Codehighlighter1_134_208_Open_Image.style.display='inline'; Codehighlighter1_134_208_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_134_208_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_134_208_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;保存一个Session在一个thread-static的类成员中。<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">class</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ThreadSessionSource&nbsp;:&nbsp;ISessionStorage<BR><IMG 
id=Codehighlighter1_268_1006_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_268_1006_Open_Text.style.display='none'; Codehighlighter1_268_1006_Closed_Image.style.display='inline'; Codehighlighter1_268_1006_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_268_1006_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_268_1006_Closed_Text.style.display='none'; Codehighlighter1_268_1006_Open_Image.style.display='inline'; Codehighlighter1_268_1006_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_268_1006_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_268_1006_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ThreadStatic]&nbsp;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISession&nbsp;m_Session;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_346_436_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_346_436_Open_Text.style.display='none'; Codehighlighter1_346_436_Closed_Image.style.display='inline'; Codehighlighter1_346_436_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_346_436_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_346_436_Closed_Text.style.display='none'; Codehighlighter1_346_436_Open_Image.style.display='inline'; Codehighlighter1_346_436_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_346_436_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_346_436_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">获得Session&nbsp;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;returns&gt;&lt;/returns&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISession&nbsp;Get()<BR><IMG 
id=Codehighlighter1_475_701_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_475_701_Open_Text.style.display='none'; Codehighlighter1_475_701_Closed_Image.style.display='inline'; Codehighlighter1_475_701_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_475_701_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_475_701_Closed_Text.style.display='none'; Codehighlighter1_475_701_Open_Image.style.display='inline'; Codehighlighter1_475_701_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_475_701_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_475_701_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(m_Session&nbsp;</SPAN><SPAN 
style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)<BR><IMG 
id=Codehighlighter1_524_661_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_524_661_Open_Text.style.display='none'; Codehighlighter1_524_661_Closed_Image.style.display='inline'; Codehighlighter1_524_661_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_524_661_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_524_661_Closed_Text.style.display='none'; Codehighlighter1_524_661_Open_Image.style.display='inline'; Codehighlighter1_524_661_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_524_661_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_524_661_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN 
style="COLOR: #000000">!</SPAN><SPAN 
style="COLOR: #000000">m_Session.IsConnected)<BR><IMG 
id=Codehighlighter1_586_647_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_586_647_Open_Text.style.display='none'; Codehighlighter1_586_647_Closed_Image.style.display='inline'; Codehighlighter1_586_647_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_586_647_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_586_647_Closed_Text.style.display='none'; Codehighlighter1_586_647_Open_Image.style.display='inline'; Codehighlighter1_586_647_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_586_647_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_586_647_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_Session.Reconnect();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_Session;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_712_811_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_712_811_Open_Text.style.display='none'; Codehighlighter1_712_811_Closed_Image.style.display='inline'; Codehighlighter1_712_811_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_712_811_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_712_811_Closed_Text.style.display='none'; Codehighlighter1_712_811_Open_Image.style.display='inline'; Codehighlighter1_712_811_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_712_811_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_712_811_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;保存Session<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;param&nbsp;name="value"&gt;&lt;/param&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Set(ISession&nbsp;value)<BR><IMG 
id=Codehighlighter1_860_1000_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_860_1000_Open_Text.style.display='none'; Codehighlighter1_860_1000_Closed_Image.style.display='inline'; Codehighlighter1_860_1000_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_860_1000_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_860_1000_Closed_Text.style.display='none'; Codehighlighter1_860_1000_Open_Image.style.display='inline'; Codehighlighter1_860_1000_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_860_1000_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_860_1000_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(value.IsConnected)<BR><IMG 
id=Codehighlighter1_909_959_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_909_959_Open_Text.style.display='none'; Codehighlighter1_909_959_Closed_Image.style.display='inline'; Codehighlighter1_909_959_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_909_959_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_909_959_Closed_Text.style.display='none'; Codehighlighter1_909_959_Open_Image.style.display='inline'; Codehighlighter1_909_959_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_909_959_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_909_959_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value.Disconnect();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_Session&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;value;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN></DIV><BR><BR>Asp.Net程序使用的ISession提供者<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
id=Codehighlighter1_0_46_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_0_46_Open_Text.style.display='none'; Codehighlighter1_0_46_Closed_Image.style.display='inline'; Codehighlighter1_0_46_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_0_46_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_0_46_Closed_Text.style.display='none'; Codehighlighter1_0_46_Open_Image.style.display='inline'; Codehighlighter1_0_46_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top><SPAN id=Codehighlighter1_0_46_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_0_46_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改日期：2005-10-05<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改人：DDL<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改原因：<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernate;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;System.Web;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage.CFG;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage<BR><IMG 
id=Codehighlighter1_179_968_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_179_968_Open_Text.style.display='none'; Codehighlighter1_179_968_Closed_Image.style.display='inline'; Codehighlighter1_179_968_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_179_968_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_179_968_Closed_Text.style.display='none'; Codehighlighter1_179_968_Open_Image.style.display='inline'; Codehighlighter1_179_968_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_179_968_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_179_968_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_182_266_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_182_266_Open_Text.style.display='none'; Codehighlighter1_182_266_Closed_Image.style.display='inline'; Codehighlighter1_182_266_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_182_266_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_182_266_Closed_Text.style.display='none'; Codehighlighter1_182_266_Open_Image.style.display='inline'; Codehighlighter1_182_266_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_182_266_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_182_266_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;储存一个ISession&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;see&nbsp;cref="HttpContext.Items"&nbsp;/&gt;</SPAN><SPAN 
style="COLOR: #008000">&nbsp;集合.<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">class</SPAN><SPAN 
style="COLOR: #000000">&nbsp;HttpSessionSource&nbsp;:&nbsp;ISessionStorage&nbsp;<BR><IMG 
id=Codehighlighter1_319_966_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_319_966_Open_Text.style.display='none'; Codehighlighter1_319_966_Closed_Image.style.display='inline'; Codehighlighter1_319_966_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_319_966_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_319_966_Closed_Text.style.display='none'; Codehighlighter1_319_966_Open_Image.style.display='inline'; Codehighlighter1_319_966_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_319_966_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_319_966_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_323_420_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_323_420_Open_Text.style.display='none'; Codehighlighter1_323_420_Closed_Image.style.display='inline'; Codehighlighter1_323_420_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_323_420_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_323_420_Closed_Text.style.display='none'; Codehighlighter1_323_420_Open_Image.style.display='inline'; Codehighlighter1_323_420_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_323_420_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_323_420_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;获得ISession&nbsp;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;returns&gt;</SPAN><SPAN 
style="COLOR: #008000">获得的ISession</SPAN><SPAN 
style="COLOR: #808080">&lt;/returns&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISession&nbsp;Get()&nbsp;<BR><IMG 
id=Codehighlighter1_448_533_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_448_533_Open_Text.style.display='none'; Codehighlighter1_448_533_Closed_Image.style.display='inline'; Codehighlighter1_448_533_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_448_533_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_448_533_Closed_Text.style.display='none'; Codehighlighter1_448_533_Open_Image.style.display='inline'; Codehighlighter1_448_533_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_448_533_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_448_533_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(ISession)HttpContext.Current.Items[Config.HttpSessionSourceItemName];<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_538_645_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_538_645_Open_Text.style.display='none'; Codehighlighter1_538_645_Closed_Image.style.display='inline'; Codehighlighter1_538_645_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_538_645_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_538_645_Closed_Text.style.display='none'; Codehighlighter1_538_645_Open_Image.style.display='inline'; Codehighlighter1_538_645_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_538_645_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_538_645_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;保存ISession<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;param&nbsp;name="value"&gt;</SPAN><SPAN 
style="COLOR: #008000">需要保存的ISession</SPAN><SPAN 
style="COLOR: #808080">&lt;/param&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Set(ISession&nbsp;value)&nbsp;<BR><IMG 
id=Codehighlighter1_683_963_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_683_963_Open_Text.style.display='none'; Codehighlighter1_683_963_Closed_Image.style.display='inline'; Codehighlighter1_683_963_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_683_963_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_683_963_Closed_Text.style.display='none'; Codehighlighter1_683_963_Open_Image.style.display='inline'; Codehighlighter1_683_963_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_683_963_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_683_963_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(value&nbsp;</SPAN><SPAN 
style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)<BR><IMG 
id=Codehighlighter1_728_830_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_728_830_Open_Text.style.display='none'; Codehighlighter1_728_830_Closed_Image.style.display='inline'; Codehighlighter1_728_830_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_728_830_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_728_830_Closed_Text.style.display='none'; Codehighlighter1_728_830_Open_Image.style.display='inline'; Codehighlighter1_728_830_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_728_830_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_728_830_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpContext.Current.Items.Add(Config.HttpSessionSourceItemName,&nbsp;value);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_861_959_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_861_959_Open_Text.style.display='none'; Codehighlighter1_861_959_Closed_Image.style.display='inline'; Codehighlighter1_861_959_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_861_959_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_861_959_Closed_Text.style.display='none'; Codehighlighter1_861_959_Open_Image.style.display='inline'; Codehighlighter1_861_959_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_861_959_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_861_959_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HttpContext.Current.Items.Remove(Config.HttpSessionSourceItemName);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN></DIV><BR>通过读取配置文件让工厂提供不同的ISession提供者<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
id=Codehighlighter1_0_46_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_0_46_Open_Text.style.display='none'; Codehighlighter1_0_46_Closed_Image.style.display='inline'; Codehighlighter1_0_46_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_0_46_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_0_46_Closed_Text.style.display='none'; Codehighlighter1_0_46_Open_Image.style.display='inline'; Codehighlighter1_0_46_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top><SPAN id=Codehighlighter1_0_46_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_0_46_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改日期：2005-10-05<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改人：DDL<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改原因：<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;System;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage.CFG;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage<BR><IMG 
id=Codehighlighter1_157_761_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_157_761_Open_Text.style.display='none'; Codehighlighter1_157_761_Closed_Image.style.display='inline'; Codehighlighter1_157_761_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_157_761_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_157_761_Closed_Text.style.display='none'; Codehighlighter1_157_761_Open_Image.style.display='inline'; Codehighlighter1_157_761_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_157_761_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_157_761_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_160_215_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_160_215_Open_Text.style.display='none'; Codehighlighter1_160_215_Closed_Image.style.display='inline'; Codehighlighter1_160_215_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_160_215_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_160_215_Closed_Text.style.display='none'; Codehighlighter1_160_215_Open_Image.style.display='inline'; Codehighlighter1_160_215_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_160_215_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_160_215_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;产生ISessionStorage的工厂<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">class</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionStorageFactory<BR><IMG 
id=Codehighlighter1_254_759_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_254_759_Open_Text.style.display='none'; Codehighlighter1_254_759_Closed_Image.style.display='inline'; Codehighlighter1_254_759_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_254_759_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_254_759_Closed_Text.style.display='none'; Codehighlighter1_254_759_Open_Image.style.display='inline'; Codehighlighter1_254_759_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_254_759_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_254_759_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_258_338_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_258_338_Open_Text.style.display='none'; Codehighlighter1_258_338_Closed_Image.style.display='inline'; Codehighlighter1_258_338_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_258_338_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_258_338_Closed_Text.style.display='none'; Codehighlighter1_258_338_Open_Image.style.display='inline'; Codehighlighter1_258_338_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_258_338_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_258_338_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;获得ISessionStorage<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;returns&gt;&lt;/returns&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionStorage&nbsp;GetSessionStorage()<BR><IMG 
id=Codehighlighter1_393_756_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_393_756_Open_Text.style.display='none'; Codehighlighter1_393_756_Closed_Image.style.display='inline'; Codehighlighter1_393_756_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_393_756_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_393_756_Closed_Text.style.display='none'; Codehighlighter1_393_756_Open_Image.style.display='inline'; Codehighlighter1_393_756_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_393_756_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_393_756_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">(Config.SessionSourceType</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">http</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">)&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">使用&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG id=Codehighlighter1_448_489_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_448_489_Open_Text.style.display='none'; Codehighlighter1_448_489_Closed_Image.style.display='inline'; Codehighlighter1_448_489_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_448_489_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_448_489_Closed_Text.style.display='none'; Codehighlighter1_448_489_Open_Image.style.display='inline'; Codehighlighter1_448_489_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_448_489_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_448_489_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN 
style="COLOR: #000000">&nbsp;HttpSessionSource();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">else</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">(Config.SessionSourceType</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">threadStatic</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG 
id=Codehighlighter1_553_605_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_553_605_Open_Text.style.display='none'; Codehighlighter1_553_605_Closed_Image.style.display='inline'; Codehighlighter1_553_605_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_553_605_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_553_605_Closed_Text.style.display='none'; Codehighlighter1_553_605_Open_Image.style.display='inline'; Codehighlighter1_553_605_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_553_605_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_553_605_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ThreadSessionSource();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_636_752_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_636_752_Open_Text.style.display='none'; Codehighlighter1_636_752_Closed_Image.style.display='inline'; Codehighlighter1_636_752_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_636_752_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_636_752_Closed_Text.style.display='none'; Codehighlighter1_636_752_Open_Image.style.display='inline'; Codehighlighter1_636_752_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_636_752_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_636_752_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">throw</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NotSupportedException(</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">不支持的SessionSourceType！</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #000000">+</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Config.SessionSourceType);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN></DIV><BR>配置类<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
id=Codehighlighter1_0_46_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_0_46_Open_Text.style.display='none'; Codehighlighter1_0_46_Closed_Image.style.display='inline'; Codehighlighter1_0_46_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_0_46_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_0_46_Closed_Text.style.display='none'; Codehighlighter1_0_46_Open_Image.style.display='inline'; Codehighlighter1_0_46_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top><SPAN id=Codehighlighter1_0_46_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_0_46_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改日期：2005-10-05<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改人：DDL<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改原因：<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;System;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;System.Configuration;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage.CFG<BR><IMG 
id=Codehighlighter1_143_1624_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_143_1624_Open_Text.style.display='none'; Codehighlighter1_143_1624_Closed_Image.style.display='inline'; Codehighlighter1_143_1624_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_143_1624_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_143_1624_Closed_Text.style.display='none'; Codehighlighter1_143_1624_Open_Image.style.display='inline'; Codehighlighter1_143_1624_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_143_1624_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_143_1624_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_146_188_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_146_188_Open_Text.style.display='none'; Codehighlighter1_146_188_Closed_Image.style.display='inline'; Codehighlighter1_146_188_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_146_188_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_146_188_Closed_Text.style.display='none'; Codehighlighter1_146_188_Open_Image.style.display='inline'; Codehighlighter1_146_188_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_146_188_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_146_188_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;配置信息帮助类<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">class</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Config<BR><IMG 
id=Codehighlighter1_214_1622_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_214_1622_Open_Text.style.display='none'; Codehighlighter1_214_1622_Closed_Image.style.display='inline'; Codehighlighter1_214_1622_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_214_1622_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_214_1622_Closed_Text.style.display='none'; Codehighlighter1_214_1622_Open_Image.style.display='inline'; Codehighlighter1_214_1622_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_214_1622_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_214_1622_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_224_435_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_224_435_Closed_Text.style.display='none'; Codehighlighter1_224_435_Open_Image.style.display='inline'; Codehighlighter1_224_435_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_224_435_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_224_435_Open_Text.style.display='none'; Codehighlighter1_224_435_Closed_Image.style.display='inline'; Codehighlighter1_224_435_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_224_435_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">私有成员</SPAN><SPAN 
id=Codehighlighter1_224_435_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;私有成员</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">object</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_Locker&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">object</SPAN><SPAN style="COLOR: #000000">();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">string</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_SessionSourceType</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">String.Empty;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">string</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_HttpSessionSourceItemName</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">String.Empty;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_446_1616_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_446_1616_Closed_Text.style.display='none'; Codehighlighter1_446_1616_Open_Image.style.display='inline'; Codehighlighter1_446_1616_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_446_1616_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_446_1616_Open_Text.style.display='none'; Codehighlighter1_446_1616_Closed_Image.style.display='inline'; Codehighlighter1_446_1616_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_446_1616_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">属性</SPAN><SPAN 
id=Codehighlighter1_446_1616_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;属性</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_466_533_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_466_533_Open_Text.style.display='none'; Codehighlighter1_466_533_Closed_Image.style.display='inline'; Codehighlighter1_466_533_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_466_533_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_466_533_Closed_Text.style.display='none'; Codehighlighter1_466_533_Open_Image.style.display='inline'; Codehighlighter1_466_533_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_466_533_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_466_533_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;Session资源源类型;http,threadStatic<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">string</SPAN><SPAN 
style="COLOR: #000000">&nbsp;SessionSourceType<BR><IMG 
id=Codehighlighter1_577_814_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_577_814_Open_Text.style.display='none'; Codehighlighter1_577_814_Closed_Image.style.display='inline'; Codehighlighter1_577_814_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_577_814_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_577_814_Closed_Text.style.display='none'; Codehighlighter1_577_814_Open_Image.style.display='inline'; Codehighlighter1_577_814_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_577_814_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_577_814_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_589_810_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_589_810_Open_Text.style.display='none'; Codehighlighter1_589_810_Closed_Image.style.display='inline'; Codehighlighter1_589_810_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_589_810_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_589_810_Closed_Text.style.display='none'; Codehighlighter1_589_810_Open_Image.style.display='inline'; Codehighlighter1_589_810_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_589_810_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_589_810_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">lock</SPAN><SPAN 
style="COLOR: #000000">(&nbsp;m_Locker&nbsp;)<BR><IMG 
id=Codehighlighter1_616_805_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_616_805_Open_Text.style.display='none'; Codehighlighter1_616_805_Closed_Image.style.display='inline'; Codehighlighter1_616_805_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_616_805_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_616_805_Closed_Text.style.display='none'; Codehighlighter1_616_805_Open_Image.style.display='inline'; Codehighlighter1_616_805_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_616_805_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_616_805_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">(m_SessionSourceType</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN 
style="COLOR: #000000">String.Empty)<BR><IMG 
id=Codehighlighter1_666_741_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_666_741_Open_Text.style.display='none'; Codehighlighter1_666_741_Closed_Image.style.display='inline'; Codehighlighter1_666_741_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_666_741_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_666_741_Closed_Text.style.display='none'; Codehighlighter1_666_741_Open_Image.style.display='inline'; Codehighlighter1_666_741_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_666_741_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_666_741_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ConfigurationManager.AppSettings[</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">SessionSourceType</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">];<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_758_799_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_758_799_Open_Text.style.display='none'; Codehighlighter1_758_799_Closed_Image.style.display='inline'; Codehighlighter1_758_799_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_758_799_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_758_799_Closed_Text.style.display='none'; Codehighlighter1_758_799_Open_Image.style.display='inline'; Codehighlighter1_758_799_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_758_799_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_758_799_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_SessionSourceType;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_819_904_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_819_904_Open_Text.style.display='none'; Codehighlighter1_819_904_Closed_Image.style.display='inline'; Codehighlighter1_819_904_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_819_904_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_819_904_Closed_Text.style.display='none'; Codehighlighter1_819_904_Open_Image.style.display='inline'; Codehighlighter1_819_904_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_819_904_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_819_904_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;HttpSessionSource存放HttpContext.Current.Items的键值名<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">string</SPAN><SPAN 
style="COLOR: #000000">&nbsp;HttpSessionSourceItemName<BR><IMG 
id=Codehighlighter1_956_1245_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_956_1245_Open_Text.style.display='none'; Codehighlighter1_956_1245_Closed_Image.style.display='inline'; Codehighlighter1_956_1245_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_956_1245_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_956_1245_Closed_Text.style.display='none'; Codehighlighter1_956_1245_Open_Image.style.display='inline'; Codehighlighter1_956_1245_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_956_1245_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_956_1245_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_968_1231_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_968_1231_Open_Text.style.display='none'; Codehighlighter1_968_1231_Closed_Image.style.display='inline'; Codehighlighter1_968_1231_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_968_1231_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_968_1231_Closed_Text.style.display='none'; Codehighlighter1_968_1231_Open_Image.style.display='inline'; Codehighlighter1_968_1231_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_968_1231_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_968_1231_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">lock</SPAN><SPAN 
style="COLOR: #000000">(&nbsp;m_Locker&nbsp;)<BR><IMG 
id=Codehighlighter1_995_1226_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_995_1226_Open_Text.style.display='none'; Codehighlighter1_995_1226_Closed_Image.style.display='inline'; Codehighlighter1_995_1226_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_995_1226_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_995_1226_Closed_Text.style.display='none'; Codehighlighter1_995_1226_Open_Image.style.display='inline'; Codehighlighter1_995_1226_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_995_1226_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_995_1226_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">(m_HttpSessionSourceItemName</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN 
style="COLOR: #000000">String.Empty)<BR><IMG 
id=Codehighlighter1_1053_1154_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1053_1154_Open_Text.style.display='none'; Codehighlighter1_1053_1154_Closed_Image.style.display='inline'; Codehighlighter1_1053_1154_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1053_1154_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1053_1154_Closed_Text.style.display='none'; Codehighlighter1_1053_1154_Open_Image.style.display='inline'; Codehighlighter1_1053_1154_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1053_1154_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1053_1154_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ConfigurationManager.AppSettings[</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">HttpSessionSourceItemName</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">];<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_1171_1220_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1171_1220_Open_Text.style.display='none'; Codehighlighter1_1171_1220_Closed_Image.style.display='inline'; Codehighlighter1_1171_1220_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1171_1220_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1171_1220_Closed_Text.style.display='none'; Codehighlighter1_1171_1220_Open_Image.style.display='inline'; Codehighlighter1_1171_1220_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1171_1220_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1171_1220_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_HttpSessionSourceItemName;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_1256_1319_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1256_1319_Open_Text.style.display='none'; Codehighlighter1_1256_1319_Closed_Image.style.display='inline'; Codehighlighter1_1256_1319_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1256_1319_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1256_1319_Closed_Text.style.display='none'; Codehighlighter1_1256_1319_Open_Image.style.display='inline'; Codehighlighter1_1256_1319_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1256_1319_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_1256_1319_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;是否使用Session资源源<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">bool</SPAN><SPAN 
style="COLOR: #000000">&nbsp;UserSessionSource<BR><IMG 
id=Codehighlighter1_1373_1596_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1373_1596_Open_Text.style.display='none'; Codehighlighter1_1373_1596_Closed_Image.style.display='inline'; Codehighlighter1_1373_1596_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1373_1596_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1373_1596_Closed_Text.style.display='none'; Codehighlighter1_1373_1596_Open_Image.style.display='inline'; Codehighlighter1_1373_1596_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1373_1596_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1373_1596_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_1403_1586_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1403_1586_Open_Text.style.display='none'; Codehighlighter1_1403_1586_Closed_Image.style.display='inline'; Codehighlighter1_1403_1586_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1403_1586_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1403_1586_Closed_Text.style.display='none'; Codehighlighter1_1403_1586_Open_Image.style.display='inline'; Codehighlighter1_1403_1586_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1403_1586_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1403_1586_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">lock</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(m_Locker)<BR><IMG 
id=Codehighlighter1_1453_1572_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1453_1572_Open_Text.style.display='none'; Codehighlighter1_1453_1572_Closed_Image.style.display='inline'; Codehighlighter1_1453_1572_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1453_1572_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1453_1572_Closed_Text.style.display='none'; Codehighlighter1_1453_1572_Open_Image.style.display='inline'; Codehighlighter1_1453_1572_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1453_1572_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1453_1572_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Convert.ToBoolean(ConfigurationManager.AppSettings[</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">UserSessionSource</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">]);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN></DIV><BR><BR>然后进行其他的一些封装操作<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
id=Codehighlighter1_0_51_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_0_51_Open_Text.style.display='none'; Codehighlighter1_0_51_Closed_Image.style.display='inline'; Codehighlighter1_0_51_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_0_51_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_0_51_Closed_Text.style.display='none'; Codehighlighter1_0_51_Open_Image.style.display='inline'; Codehighlighter1_0_51_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top><SPAN id=Codehighlighter1_0_51_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_0_51_Open_Text><SPAN style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改日期：2005-10-05<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改人：DDL<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;*&nbsp;修改原因：生成工厂类<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage.CFG;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernate;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernate.Cfg;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Index.Data.NHibernateSessionStorage<BR><IMG 
id=Codehighlighter1_188_2856_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_188_2856_Open_Text.style.display='none'; Codehighlighter1_188_2856_Closed_Image.style.display='inline'; Codehighlighter1_188_2856_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_188_2856_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_188_2856_Closed_Text.style.display='none'; Codehighlighter1_188_2856_Open_Image.style.display='inline'; Codehighlighter1_188_2856_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_188_2856_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_188_2856_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_194_252_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_194_252_Open_Text.style.display='none'; Codehighlighter1_194_252_Closed_Image.style.display='inline'; Codehighlighter1_194_252_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_194_252_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_194_252_Closed_Text.style.display='none'; Codehighlighter1_194_252_Open_Image.style.display='inline'; Codehighlighter1_194_252_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_194_252_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_194_252_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;用来生成ISession实例的工厂<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">class</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernateDatabaseFactory<BR><IMG 
id=Codehighlighter1_307_2854_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_307_2854_Open_Text.style.display='none'; Codehighlighter1_307_2854_Closed_Image.style.display='inline'; Codehighlighter1_307_2854_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_307_2854_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_307_2854_Closed_Text.style.display='none'; Codehighlighter1_307_2854_Open_Image.style.display='inline'; Codehighlighter1_307_2854_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_307_2854_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_307_2854_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
id=Codehighlighter1_317_587_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_317_587_Closed_Text.style.display='none'; Codehighlighter1_317_587_Open_Image.style.display='inline'; Codehighlighter1_317_587_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_317_587_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_317_587_Open_Text.style.display='none'; Codehighlighter1_317_587_Closed_Image.style.display='inline'; Codehighlighter1_317_587_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_317_587_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">私有静态变量</SPAN><SPAN 
id=Codehighlighter1_317_587_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;私有静态变量</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">object</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_Locker&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">object</SPAN><SPAN style="COLOR: #000000">();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Configuration&nbsp;m_Configuration&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionFactory&nbsp;m_SessionFactory&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionStorage&nbsp;m_Sessionsource;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_598_769_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_598_769_Closed_Text.style.display='none'; Codehighlighter1_598_769_Open_Image.style.display='inline'; Codehighlighter1_598_769_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_598_769_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_598_769_Open_Text.style.display='none'; Codehighlighter1_598_769_Closed_Image.style.display='inline'; Codehighlighter1_598_769_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_598_769_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">静态构造函数</SPAN><SPAN 
id=Codehighlighter1_598_769_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;静态构造函数</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;NHibernateDatabaseFactory()<BR><IMG 
id=Codehighlighter1_665_749_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_665_749_Open_Text.style.display='none'; Codehighlighter1_665_749_Closed_Image.style.display='inline'; Codehighlighter1_665_749_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_665_749_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_665_749_Closed_Text.style.display='none'; Codehighlighter1_665_749_Open_Image.style.display='inline'; Codehighlighter1_665_749_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_665_749_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_665_749_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_Sessionsource&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionStorageFactory.GetSessionStorage();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_780_1914_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_780_1914_Closed_Text.style.display='none'; Codehighlighter1_780_1914_Open_Image.style.display='inline'; Codehighlighter1_780_1914_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_780_1914_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_780_1914_Open_Text.style.display='none'; Codehighlighter1_780_1914_Closed_Image.style.display='inline'; Codehighlighter1_780_1914_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_780_1914_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">内部静态变量</SPAN><SPAN 
id=Codehighlighter1_780_1914_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;内部静态变量</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_804_867_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_804_867_Open_Text.style.display='none'; Codehighlighter1_804_867_Closed_Image.style.display='inline'; Codehighlighter1_804_867_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_804_867_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_804_867_Closed_Text.style.display='none'; Codehighlighter1_804_867_Open_Image.style.display='inline'; Codehighlighter1_804_867_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_804_867_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_804_867_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;NHibernate配置对象<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Configuration&nbsp;Configuration<BR><IMG 
id=Codehighlighter1_926_1277_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_926_1277_Open_Text.style.display='none'; Codehighlighter1_926_1277_Closed_Image.style.display='inline'; Codehighlighter1_926_1277_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_926_1277_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_926_1277_Closed_Text.style.display='none'; Codehighlighter1_926_1277_Open_Image.style.display='inline'; Codehighlighter1_926_1277_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_926_1277_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_926_1277_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_956_1222_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_956_1222_Open_Text.style.display='none'; Codehighlighter1_956_1222_Closed_Image.style.display='inline'; Codehighlighter1_956_1222_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_956_1222_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_956_1222_Closed_Text.style.display='none'; Codehighlighter1_956_1222_Open_Image.style.display='inline'; Codehighlighter1_956_1222_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_956_1222_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_956_1222_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">lock</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(m_Locker)<BR><IMG 
id=Codehighlighter1_1006_1208_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1006_1208_Open_Text.style.display='none'; Codehighlighter1_1006_1208_Closed_Image.style.display='inline'; Codehighlighter1_1006_1208_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1006_1208_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1006_1208_Closed_Text.style.display='none'; Codehighlighter1_1006_1208_Open_Image.style.display='inline'; Codehighlighter1_1006_1208_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1006_1208_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1006_1208_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(m_Configuration&nbsp;</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)<BR><IMG 
id=Codehighlighter1_1077_1146_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1077_1146_Open_Text.style.display='none'; Codehighlighter1_1077_1146_Closed_Image.style.display='inline'; Codehighlighter1_1077_1146_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1077_1146_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1077_1146_Closed_Text.style.display='none'; Codehighlighter1_1077_1146_Open_Image.style.display='inline'; Codehighlighter1_1077_1146_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1077_1146_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1077_1146_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CreateConfiguration();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_Configuration;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG id=Codehighlighter1_1240_1267_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1240_1267_Open_Text.style.display='none'; Codehighlighter1_1240_1267_Closed_Image.style.display='inline'; Codehighlighter1_1240_1267_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1240_1267_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1240_1267_Closed_Text.style.display='none'; Codehighlighter1_1240_1267_Open_Image.style.display='inline'; Codehighlighter1_1240_1267_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">set</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1240_1267_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1240_1267_Open_Text><SPAN 
style="COLOR: #000000">{&nbsp;m_Configuration&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">&nbsp;value;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_1288_1352_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1288_1352_Open_Text.style.display='none'; Codehighlighter1_1288_1352_Closed_Image.style.display='inline'; Codehighlighter1_1288_1352_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1288_1352_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1288_1352_Closed_Text.style.display='none'; Codehighlighter1_1288_1352_Open_Image.style.display='inline'; Codehighlighter1_1288_1352_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1288_1352_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_1288_1352_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;NHibernate的对象工厂<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">internal</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISessionFactory&nbsp;SessionFactory<BR><IMG 
id=Codehighlighter1_1416_1894_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1416_1894_Open_Text.style.display='none'; Codehighlighter1_1416_1894_Closed_Image.style.display='inline'; Codehighlighter1_1416_1894_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1416_1894_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1416_1894_Closed_Text.style.display='none'; Codehighlighter1_1416_1894_Open_Image.style.display='inline'; Codehighlighter1_1416_1894_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1416_1894_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1416_1894_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">get</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
id=Codehighlighter1_1446_1884_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1446_1884_Open_Text.style.display='none'; Codehighlighter1_1446_1884_Closed_Image.style.display='inline'; Codehighlighter1_1446_1884_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1446_1884_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1446_1884_Closed_Text.style.display='none'; Codehighlighter1_1446_1884_Open_Image.style.display='inline'; Codehighlighter1_1446_1884_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1446_1884_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1446_1884_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_SessionFactory)<BR><IMG 
id=Codehighlighter1_1510_1828_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1510_1828_Open_Text.style.display='none'; Codehighlighter1_1510_1828_Closed_Image.style.display='inline'; Codehighlighter1_1510_1828_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1510_1828_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1510_1828_Closed_Text.style.display='none'; Codehighlighter1_1510_1828_Open_Image.style.display='inline'; Codehighlighter1_1510_1828_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1510_1828_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1510_1828_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(m_Configuration&nbsp;</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)<BR><IMG 
id=Codehighlighter1_1581_1650_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1581_1650_Open_Text.style.display='none'; Codehighlighter1_1581_1650_Closed_Image.style.display='inline'; Codehighlighter1_1581_1650_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1581_1650_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1581_1650_Closed_Text.style.display='none'; Codehighlighter1_1581_1650_Open_Image.style.display='inline'; Codehighlighter1_1581_1650_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1581_1650_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1581_1650_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CreateConfiguration();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">lock</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(m_Locker)<BR><IMG 
id=Codehighlighter1_1708_1810_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1708_1810_Open_Text.style.display='none'; Codehighlighter1_1708_1810_Closed_Image.style.display='inline'; Codehighlighter1_1708_1810_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1708_1810_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1708_1810_Closed_Text.style.display='none'; Codehighlighter1_1708_1810_Open_Image.style.display='inline'; Codehighlighter1_1708_1810_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1708_1810_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1708_1810_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_SessionFactory&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Configuration.BuildSessionFactory();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_SessionFactory;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_1925_2580_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_1925_2580_Closed_Text.style.display='none'; Codehighlighter1_1925_2580_Open_Image.style.display='inline'; Codehighlighter1_1925_2580_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_1925_2580_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1925_2580_Open_Text.style.display='none'; Codehighlighter1_1925_2580_Closed_Image.style.display='inline'; Codehighlighter1_1925_2580_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1925_2580_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">公共方法</SPAN><SPAN 
id=Codehighlighter1_1925_2580_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;公共方法</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_1947_2048_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_1947_2048_Open_Text.style.display='none'; Codehighlighter1_1947_2048_Closed_Image.style.display='inline'; Codehighlighter1_1947_2048_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1947_2048_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_1947_2048_Closed_Text.style.display='none'; Codehighlighter1_1947_2048_Open_Image.style.display='inline'; Codehighlighter1_1947_2048_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1947_2048_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_1947_2048_Open_Text><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN 
style="COLOR: #008000">&nbsp;建立ISessionFactory的实例<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;/summary&gt;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #808080">///</SPAN><SPAN style="COLOR: #008000">&nbsp;</SPAN><SPAN 
style="COLOR: #808080">&lt;returns&gt;&lt;/returns&gt;</SPAN><SPAN 
style="COLOR: #808080"></SPAN></SPAN><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">public</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ISession&nbsp;CreateSession()<BR><IMG 
id=Codehighlighter1_2104_2560_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_2104_2560_Open_Text.style.display='none'; Codehighlighter1_2104_2560_Closed_Image.style.display='inline'; Codehighlighter1_2104_2560_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2104_2560_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_2104_2560_Closed_Text.style.display='none'; Codehighlighter1_2104_2560_Open_Image.style.display='inline'; Codehighlighter1_2104_2560_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2104_2560_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2104_2560_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(Config.UserSessionSource)&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">如果使用保存的ISession</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG id=Codehighlighter1_2178_2436_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_2178_2436_Open_Text.style.display='none'; Codehighlighter1_2178_2436_Closed_Image.style.display='inline'; Codehighlighter1_2178_2436_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2178_2436_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_2178_2436_Closed_Text.style.display='none'; Codehighlighter1_2178_2436_Open_Image.style.display='inline'; Codehighlighter1_2178_2436_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2178_2436_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2178_2436_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ISession&nbsp;s&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">&nbsp;m_Sessionsource.Get();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(s&nbsp;</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">)<BR><IMG 
id=Codehighlighter1_2279_2396_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_2279_2396_Open_Text.style.display='none'; Codehighlighter1_2279_2396_Closed_Image.style.display='inline'; Codehighlighter1_2279_2396_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2279_2396_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_2279_2396_Closed_Text.style.display='none'; Codehighlighter1_2279_2396_Open_Image.style.display='inline'; Codehighlighter1_2279_2396_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2279_2396_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2279_2396_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">&nbsp;SessionFactory.OpenSession();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_Sessionsource.Set(s);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;s;<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">else</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">如果使用新ISession</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
id=Codehighlighter1_2483_2550_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_2483_2550_Open_Text.style.display='none'; Codehighlighter1_2483_2550_Closed_Image.style.display='inline'; Codehighlighter1_2483_2550_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2483_2550_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_2483_2550_Closed_Text.style.display='none'; Codehighlighter1_2483_2550_Open_Image.style.display='inline'; Codehighlighter1_2483_2550_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2483_2550_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2483_2550_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;SessionFactory.OpenSession();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG id=Codehighlighter1_2591_2848_Closed_Image 
onclick="this.style.display='none'; Codehighlighter1_2591_2848_Closed_Text.style.display='none'; Codehighlighter1_2591_2848_Open_Image.style.display='inline'; Codehighlighter1_2591_2848_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top><IMG id=Codehighlighter1_2591_2848_Open_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_2591_2848_Open_Text.style.display='none'; Codehighlighter1_2591_2848_Closed_Image.style.display='inline'; Codehighlighter1_2591_2848_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2591_2848_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">私有方法</SPAN><SPAN 
id=Codehighlighter1_2591_2848_Open_Text style="DISPLAY: none"><SPAN 
style="COLOR: #0000ff">#region</SPAN><SPAN 
style="COLOR: #000000">&nbsp;私有方法</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">private</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">static</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;CreateConfiguration()<BR><IMG 
id=Codehighlighter1_2663_2828_Open_Image 
onclick="this.style.display='none'; Codehighlighter1_2663_2828_Open_Text.style.display='none'; Codehighlighter1_2663_2828_Closed_Image.style.display='inline'; Codehighlighter1_2663_2828_Closed_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2663_2828_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; Codehighlighter1_2663_2828_Closed_Text.style.display='none'; Codehighlighter1_2663_2828_Open_Image.style.display='inline'; Codehighlighter1_2663_2828_Open_Text.style.display='inline';" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2663_2828_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2663_2828_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_Configuration&nbsp;</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">new</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Configuration();<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;Add&nbsp;interceptor,&nbsp;if&nbsp;you&nbsp;need&nbsp;to.<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;_config.Interceptor&nbsp;=&nbsp;new&nbsp;Interceptor();</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InBlock.gif" 
align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">#endregion</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN></DIV><BR>使用方法<BR>非Asp.net应用配置<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">appSettings</SPAN><SPAN 
style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">key</SPAN><SPAN 
style="COLOR: #0000ff">="SessionSourceType"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN 
style="COLOR: #0000ff">="threadStatic"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">key</SPAN><SPAN 
style="COLOR: #0000ff">="HttpSessionSourceItemName"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN 
style="COLOR: #0000ff">="NHSession"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">key</SPAN><SPAN 
style="COLOR: #0000ff">="UserSessionSource"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN 
style="COLOR: #0000ff">="true"</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN 
style="COLOR: #800000">appSettings</SPAN><SPAN 
style="COLOR: #0000ff">&gt;</SPAN></DIV><BR>Asp.net应用配置<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">appSettings</SPAN><SPAN 
style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">key</SPAN><SPAN 
style="COLOR: #0000ff">="SessionSourceType"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN 
style="COLOR: #0000ff">="http"</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">key</SPAN><SPAN 
style="COLOR: #0000ff">="HttpSessionSourceItemName"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN 
style="COLOR: #0000ff">="NHSession"</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">key</SPAN><SPAN 
style="COLOR: #0000ff">="UserSessionSource"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;value</SPAN><SPAN 
style="COLOR: #0000ff">="true"</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN 
style="COLOR: #800000">appSettings</SPAN><SPAN 
style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">httpModules</SPAN><SPAN 
style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">&lt;</SPAN><SPAN 
style="COLOR: #800000">add&nbsp;</SPAN><SPAN 
style="COLOR: #ff0000">type</SPAN><SPAN 
style="COLOR: #0000ff">="Index.Data.NHibernateData.SessionStorage.NHSessionModule,&nbsp;Index.Data.NHibernate"</SPAN><SPAN 
style="COLOR: #ff0000">&nbsp;name</SPAN><SPAN 
style="COLOR: #0000ff">="NHSessionModule"</SPAN><SPAN 
style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN 
style="COLOR: #800000">httpModules</SPAN><SPAN 
style="COLOR: #0000ff">&gt;</SPAN></DIV><BR>然后在程序开始的时候配置下<BR>
<DIV 
style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" align=top><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Index.Data.NHibernateData.SessionStorage.NHibernateFactory.Configuration.Configure(Server.MapPath(</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">~</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN 
style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN 
style="COLOR: #000000">\\hibernate.cfg.xml</SPAN><SPAN 
style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/None.gif" 
align=top></SPAN></DIV><BR>对于Asp.net我会把次段代码写在Global.asax的Application_Start方法里。 
<BR><BR><BR><BR>
<DIV id=c_jquery_test style="DISPLAY: none"></DIV>
<SCRIPT type=text/javascript>
if ($ != jQuery) {
	$ = jQuery.noConflict();
}
</SCRIPT>

<DIV id=digg_block>
<DIV id=author_profile>
<DIV class=author_profile_info>
<DIV class=author_profile_info><A href="http://home.cnblogs.com/renrenqq/" 
target=_blank>DDL</A><BR>关注 - 0<BR>粉丝 - 3<BR></DIV></DIV>
<DIV class=clear></DIV>
<DIV id=author_profile_follow></DIV></DIV>
<DIV id=div_digg>
<DIV class=diggit onclick=DiggIt(467688,1769,1)><SPAN class=diggnum 
id=digg_count_467688>0</SPAN> </DIV>
<DIV class=buryit onclick=DiggIt(467688,1769,2)><SPAN class=burynum 
id=bury_count_467688>0</SPAN> </DIV>
<DIV class=clear></DIV><SPAN id=span_isdigged_467688 
style="DISPLAY: none">0</SPAN> 
<DIV class=diggword id=digg_word_467688>(请您对文章做出评价)</DIV></DIV></DIV>
<DIV class=clear></DIV>
<DIV id=post_next_prev><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/03/466636.html">« 
</A>上一篇：<A title="发布于2006-08-03 12:43" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/03/466636.html">有关NHibernate的问题请在此提出</A><BR><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/07/469784.html">» 
</A>下一篇：<A title="发布于2006-08-07 13:55" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/07/469784.html">NHibernate的数据库连接机制分析和如何使用外部连接</A><BR></DIV>
<SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/google_service.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
    var c_enable_dfp = true;
    if (navigator.userAgent.indexOf("Chrome/6.0.401.1") > 0) {
        c_enable_dfp = false;
    }
    if (c_enable_dfp) {
        try {
            GS_googleAddAdSenseService("ca-pub-4210569241504288");
            GS_googleEnableAllServices();
        }
        catch (e) { }
    }
</SCRIPT>

<SCRIPT type=text/javascript>
    if (c_enable_dfp) {
        try {
            GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_body");
            GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_commentbox_up");
            GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom");
            GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom1");
        }
        catch (e) { }
    }
</SCRIPT>

<SCRIPT type=text/javascript>
    if (c_enable_dfp) {
        try {
            GA_googleFetchAds();
        } catch (e) { }
    }
</SCRIPT>

<SCRIPT type=text/javascript>
	var blog_ad_has_shown = false;
	var cb_c_u_id = '4b753d0b-63cf-dd11-9e4d-001cf0cd104b';
	var cb_blog_uid = '4880310b-63cf-dd11-9e4d-001cf0cd104b';
</SCRIPT>

<SCRIPT type=text/javascript>GetFollowAction();</SCRIPT>

<DIV class=postDesc>posted on 2006-08-04 13:32 <A 
href="http://www.cnblogs.com/renrenqq/">DDL</A> 阅读(4741) <A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">评论(15)</A> 
<A 
onclick="open_link('http://www.cnblogs.com/renrenqq/admin/EditPosts.aspx?postid=467688')" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">编辑</A> <A 
onclick="AddToWz(467688);return false;" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">收藏</A> 
所属分类: <A 
href="http://www.cnblogs.com/renrenqq/category/39891.html">NHibernate</A></DIV></DIV><IMG 
height=1 src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/467688.jpg" width=1> <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html"
dc:identifier="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html"
dc:title=""
trackback:ping="http://www.cnblogs.com/renrenqq/services/trackbacks/467688.aspx" />
</rdf:RDF>
--><A name=pagedcomment></A><!--done--><BR><B>评论:</B> 
<DIV class=feedbackNoItems><SPAN id=span_comment_maxid 
style="DISPLAY: none">1702476</SPAN></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#467698">#1楼</A><A 
id=comment_anchor_467698 name=467698></A> 2006-08-04 13:41 | <A 
id=Comments1_CommentList_ctl00_NameLink href="http://www.cnblogs.com/Terrylee/" 
target=_blank>TerryLee</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/TerryLee">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_467698>把你写的关于NHibernate的文章整理一下放在一篇文章里面做链接，并进行分类，这样可以收录到精华区:-)</SPAN><BR>　<A 
onclick='ReplyComment("TerryLee",467698,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(467698,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#467704">#2楼</A><A 
id=comment_anchor_467704 name=467704></A>[<SPAN class=louzhu>楼主</SPAN>] 
2006-08-04 13:45 | <A id=Comments1_CommentList_ctl01_NameLink 
href="http://www.cnblogs.com/renrenqq/" target=_blank>DDL</A>&nbsp;<A 
class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/DDL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_467704>＠TerryLee 
<BR>我可能还会有十篇左右关于NHibernate的文章，等全部写完我会整理出一个目录，但这个过程可能会比较长，我尽量做到每周坚持一篇，所以暂时只能写一篇放一篇．</SPAN><BR>　<A 
onclick='ReplyComment("DDL",467704,"y3JtGpFeNkoevKfGJRbXTmyh4ycWGYr5SjJWPtP910W7nk5lfcLAHA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(467704,"y3JtGpFeNkoevKfGJRbXTmyh4ycWGYr5SjJWPtP910W7nk5lfcLAHA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=DDL" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#467838">#3楼</A><A 
id=comment_anchor_467838 name=467838></A> 2006-08-04 15:47 | <A 
id=Comments1_CommentList_ctl02_NameLink href="http://www.cnblogs.com/Terrylee/" 
target=_blank>TerryLee</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/TerryLee">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_467838>@DDL 
<BR><BR>好的，支持！</SPAN><BR>　<A 
onclick='ReplyComment("TerryLee",467838,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(467838,"K82dKaku/JiNNC/PeczvjL4gReWZAaP9pFNyUxpHUmhQUsdw4bZYEA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=TerryLee" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#468029">#4楼</A><A 
id=comment_anchor_468029 name=468029></A> 2006-08-04 18:28 | <A 
id=Comments1_CommentList_ctl03_NameLink href="http://www.cnblogs.com/wdxinren/" 
target=_blank>小新0574</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/å°æ°0574">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_468029>写得不错，支持一下</SPAN><BR>　<A 
onclick='ReplyComment("小新0574",468029,"1gtHlmUC2cSzsuz/sC4anb+gQOj0fyf+s1CaWqzqOAVClxn/yShCoA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(468029,"1gtHlmUC2cSzsuz/sC4anb+gQOj0fyf+s1CaWqzqOAVClxn/yShCoA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e5%b0%8f%e6%96%b00574" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#468118">#5楼</A><A 
id=comment_anchor_468118 name=468118></A> 2006-08-04 20:31 | <A 
id=Comments1_CommentList_ctl04_NameLink href="http://www.cnblogs.com/nomagic/" 
target=_blank>蔡克伦</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/è¡åä¼¦">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_468118>支持！ 
<BR><BR>另外在nh主页上有一个连接： <BR><A 
href="http://blogs.intesoft.net/simon/articles/16.aspx" 
target=_new>http://blogs.intesoft.net/simon/articles/16.aspx</A> <BR>里面Simon 
Green也提供了一种做法，也是使用httpmodule来管理session（看来这已经成为了一种共识），我觉得更简洁一些，并且我把它用在实际项目中，运行良好。</SPAN><BR>　<A 
onclick='ReplyComment("蔡克伦",468118,"fkWwWYg4U1ERtRMWvQE4NP49GaJme6me14ZKFaE70RvyQriu2BX8Hw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(468118,"fkWwWYg4U1ERtRMWvQE4NP49GaJme6me14ZKFaE70RvyQriu2BX8Hw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e8%94%a1%e5%85%8b%e4%bc%a6" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#468123">#6楼</A><A 
id=comment_anchor_468123 name=468123></A> 2006-08-04 20:34 | <A 
id=Comments1_CommentList_ctl05_NameLink href="http://www.cnblogs.com/aspnetx/" 
target=_blank>aspnetx</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/aspnetx">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_468123>支持 
<BR>学习中...</SPAN><BR>　<A 
onclick='ReplyComment("aspnetx",468123,"qIGq01hRF+Zly6/52NvxF6LJwMHUc50GUO1fAzCxoa5R4cjO13iwOg==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(468123,"qIGq01hRF+Zly6/52NvxF6LJwMHUc50GUO1fAzCxoa5R4cjO13iwOg==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=aspnetx" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#469638">#7楼</A><A 
id=comment_anchor_469638 name=469638></A>[<SPAN class=louzhu>楼主</SPAN>] 
2006-08-07 10:07 | <A id=Comments1_CommentList_ctl06_NameLink 
href="http://www.cnblogs.com/renrenqq/" target=_blank>DDL</A>&nbsp;<A 
class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/DDL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_469638>@蔡克伦 
<BR><BR><A href="http://blogs.intesoft.net/simon/articles/16.aspx" 
target=_new>http://blogs.intesoft.net/simon/articles/16.aspx</A> 
里面的Session管理和在Asp.net中我写的其实是一样的，而我还考虑到了非Winfrom和其他的应用程序． 
<BR><BR>我单独把这块提出来，因为可以在他上面写数据访问的帮助类库．</SPAN><BR>　<A 
onclick='ReplyComment("DDL",469638,"y3JtGpFeNkoevKfGJRbXTmyh4ycWGYr5SjJWPtP910W7nk5lfcLAHA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(469638,"y3JtGpFeNkoevKfGJRbXTmyh4ycWGYr5SjJWPtP910W7nk5lfcLAHA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=DDL" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#473129">#8楼</A><A 
id=comment_anchor_473129 name=473129></A> 2006-08-10 11:59 | <A 
id=Comments1_CommentList_ctl07_NameLink href="http://www.cnblogs.com/yyw84/" 
target=_blank>杨炎武</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/æ¨çæ&shy;¦">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_473129>是不是这样使用了就不用再每次操作都不会再关系Session的关闭问题了? 
<BR><BR>而且我在使用的过程中发现一个问题,NHibernateDatabaseFactory.CreateSession()有时候获取到的Session是已经关闭了的,所以最好给它加上 
<BR>if (!s.IsConnected) <BR>s.Reconnect(); <BR></SPAN><BR>　<A 
onclick='ReplyComment("杨炎武",473129,"9k4RZEUvePQwc078n0i0Glh3mOOrPvwVtjgWxaNR/Z4BNL1runknrQ==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(473129,"9k4RZEUvePQwc078n0i0Glh3mOOrPvwVtjgWxaNR/Z4BNL1runknrQ==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e6%9d%a8%e7%82%8e%e6%ad%a6" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#473422">#9楼</A><A 
id=comment_anchor_473422 name=473422></A>[<SPAN class=louzhu>楼主</SPAN>] 
2006-08-10 15:44 | <A id=Comments1_CommentList_ctl08_NameLink 
href="http://www.cnblogs.com/renrenqq/" target=_blank>DDL</A>&nbsp;<A 
class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/DDL">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_473422>@杨炎武 
<BR>在我调用此类库的其他类库中,对此进行了其他的处理,所以我使用时不存在此问题. <BR><BR>至于你说的问题,你可以按你的想法进行更改. 
<BR><BR></SPAN><BR>　<A 
onclick='ReplyComment("DDL",473422,"y3JtGpFeNkoevKfGJRbXTmyh4ycWGYr5SjJWPtP910W7nk5lfcLAHA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(473422,"y3JtGpFeNkoevKfGJRbXTmyh4ycWGYr5SjJWPtP910W7nk5lfcLAHA==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=DDL" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#513500">#10楼</A><A 
id=comment_anchor_513500 name=513500></A> 2006-09-24 19:57 | <A 
id=Comments1_CommentList_ctl09_NameLink 
href="http://www.cnblogs.com/zhongkeruanjian/" 
target=_blank>Zhongkeruanjian</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/Zhongkeruanjian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_513500>Castle的NHibernateIntegration已经解决的这个问题，而且功能更加丰富。不过它依赖于IOC。如果不用IOC，还得改写。</SPAN><BR>　<A 
onclick='ReplyComment("Zhongkeruanjian",513500,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(513500,"WAsq3nYMcD4i0fa5S827OglofK5uE4lgZjrlvtbLjBxu6agyr1Irgw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=Zhongkeruanjian" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#545782">#11楼</A><A 
id=comment_anchor_545782 name=545782></A> 2006-10-31 17:41 | <A 
id=Comments1_CommentList_ctl10_NameLink href="http://www.cnblogs.com/ivanking/" 
target=_blank>ivanking</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/ivanking">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body id=comment_body_545782>@DDL 
<BR>你的ThreadSessionSource 中的set() <BR>if (value.IsConnected) <BR>{ 
<BR>value.Disconnect(); <BR>} <BR>为什么要把session断开连接再保存? <BR>如果windows程序下, 
<BR>我第一次在打开新session后需要保存而调用set <BR>岂不是connection在不知情的情况下被断开? <BR><BR>ISession s 
= m_Sessionsource.Get(); <BR>if (s == null) <BR>{ <BR>s = 
SessionFactory.OpenSession(); <BR><BR>m_Sessionsource.Set(s); <BR>} 
<BR>这么做是否是出于别的考虑?</SPAN><BR>　<A 
onclick='ReplyComment("ivanking",545782,"wsEvj5xmN8kvRG+z+OR63Sh/csO7229PXqVbjxfyFqbqhUK+Cs2iFw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(545782,"wsEvj5xmN8kvRG+z+OR63Sh/csO7229PXqVbjxfyFqbqhUK+Cs2iFw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=ivanking" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#688750">#12楼</A><A 
id=comment_anchor_688750 name=688750></A> 59.37.232.* 2007-03-26 17:21 | <A 
id=Comments1_CommentList_ctl11_NameLink 
href="http://www.cnitblog.com/r.aspx?url=http://www.dianshijin.cn" target=_blank 
rel=nofllow>茄子[未注册用户]</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_688750>学习</SPAN><BR>　<A onclick='ReplyComment("茄子",688750,"")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(688750,"")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#1180464">#13楼</A><A 
id=comment_anchor_1180464 name=1180464></A> 211.93.159.* 2008-05-03 18:15 | <A 
id=Comments1_CommentList_ctl12_NameLink target=_blank>ycguo[未注册用户]</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_1180464>对于有多个数据库连接的情况是不是不适用</SPAN><BR>　<A 
onclick='ReplyComment("ycguo",1180464,"")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(1180464,"")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#1373076">#14楼</A><A 
id=comment_anchor_1373076 name=1373076></A> 2008-11-18 09:12 | <A 
id=Comments1_CommentList_ctl13_NameLink href="http://www.cnblogs.com/skyland84/" 
target=_blank>幻蓝</A>&nbsp;<A class=sendMsg2This title=给此人发送站内短消息 
href="http://space.cnblogs.com/msg/send/å¹»è">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_1373076>--引用-------------------------------------------------- 
<BR>ivanking: @DDL <BR>&lt;br&gt;你的ThreadSessionSource 中的set() <BR>&lt;br&gt; if 
(value.IsConnected) <BR>&lt;br&gt; { <BR>&lt;br&gt; value.Disconnect(); 
<BR>&lt;br&gt; } <BR>&lt;br&gt;为什么要把session断开连接再保存? <BR>&lt;br&gt;如果windows程序下, 
<BR>&lt;br&gt;我第一次在打开新session后需要保存而调用set <BR>&lt;br&gt;岂不是connection在不知情的情况下被断开? 
<BR>&lt;br&gt; <BR>&lt;br&gt; ISession s = m_Sessionsource.Get(); <BR>&lt;br&gt; 
if (s == null) <BR>&lt;br&gt; { <BR>&lt;br&gt; s = SessionFactory.OpenSession(); 
<BR>&lt;br&gt; <BR>&lt;br&gt; m_Sessionsource.Set(s); <BR>&lt;br&gt; } 
<BR>&lt;br&gt;这么做是否是出于别的考虑? 
<BR>-------------------------------------------------------- 
<BR>他这样写的话，好处在于能控制数据库的链接资源。 <BR><BR>在一个Session中多查询，多删除，处理时。可以只连一次，处理完后释放资源。 
<BR><BR>可见的资源管理，这样倒是很好。。。 <BR><BR>不知道作者是不是这种意图。</SPAN><BR>　<A 
onclick='ReplyComment("幻蓝",1373076,"RPgVth71DPjMT0pg3KX5AkQJx1/CTxcBlne9uegnHU1Bsb5dhZqVvw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(1373076,"RPgVth71DPjMT0pg3KX5AkQJx1/CTxcBlne9uegnHU1Bsb5dhZqVvw==")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　<A 
title=查看该作者发表过的评论 
href="http://www.cnblogs.com/CommentsByAuthor.aspx?author=%e5%b9%bb%e8%93%9d" 
target=_blank>查看</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<DIV class=feedbackItem>
<DIV class=feedbackListSubtitle><A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#1702476">#15楼</A><A 
id=comment_anchor_1702476 name=1702476></A> 125.120.148.* <A 
name=Post></A>2009-11-19 16:41 | <A id=Comments1_CommentList_ctl14_NameLink 
target=_blank>SHOW1[未注册用户]</A><BR>
<DIV align=left><SPAN class=blog_comment_body 
id=comment_body_1702476>m_HttpSessionSourceItemName 
<BR>这个值我发现一直是空的</SPAN><BR>　<A onclick='ReplyComment("SHOW1",1702476,"")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">回复</A>　<A 
onclick='QuoteComment(1702476,"")' 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#commentform">引用</A>　&nbsp;&nbsp;</DIV></DIV></DIV>
<SCRIPT type=text/javascript>   
    function PostComment(){
        if($("#btn_comment_submit").val() == "修改" && $("#comment_edit_id").html !=''){
            UpdateComment(1769);
        }
        else{
            PostNewComment();
        }
    }
    
    function PostNewComment() {
        
        var content = $("#tbCommentBody").val();
        if (content.length == 0) {
            alert('请输入评论内容！');
            return;
        }
        if(content.length > 4000){
            alert('评论内容过长，超过4000个字数限制！当前长度：'+content.length);
            return;
        }
        
        if($("#span_comment_posted").html()!='' && $("#span_comment_posted").html()==content){
             alert("该评论已发表过!");
            return;
        }        
        
        $("#tip_comment").html("评论提交中...");        
        $("#span_comment_posted").html(content);
        var email = $("#tbCommentEmail").val();
        var author =$("#ctl05_tbCommentAuthor").val();
        var comment = {};
        comment.parentId = 467688;
        comment.blogId = 1769;
        comment.sourceUrl = 'http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html';        
        comment.title = $("#span_comment_title").text();
        comment.content = content;
        var parentId = $("#span_parentcomment_id").text();
        if(/(\d)/.test(parentId)){
        comment.parentCommentId = parentId;
        }else{
        comment.parentCommentId = 0;
        }
        var startDate = new Date();
        $.ajax({
            url: '/ws/CommentService.asmx/AddComment',
            data: $.toJSON(comment),
            type: "post",
            dataType: "json",
            contentType: "application/json; charset=utf8",
            success: function(data) {
                if (data.d) {
                    if(data.d["IsSuccess"]){
                        var dt = (new Date()).getTime()-startDate;
                        ShowCommentMsg("感谢您的回复:)" + " 提交耗时"+dt+"毫秒");                        
                        //RereshComments2(comment.parentId);  
                        $("#tbCommentBody").val(''); 
                        $("#divCommentShow").html($("#divCommentShow").html()+data.d["ReturnData"]);                  
                        //$("#divCommentShow").html(data.d["ReturnData"]+content.replace(/\n/g,"<br/>")+"<br/><br/>");                         
                        CommentNotify(data.d["CommentID"]);                        
                        }else{
                        ShowCommentMsg(data.d["ReturnData"]);
                        $("#span_comment_posted").html('');                        
                   }
                } else {
                    var errorMsg = "抱歉！评论提交失败！请与管理员联系。";                    
                    if(data.d["ReturnData"]!=''){
                        errorMsg = errorMsg+"错误信息："+errorMsg;
                    }
                    ShowCommentMsg(errorMsg);
                    $("#span_comment_posted").html('');  
                }
            },
            error: function(xhr) {
                //alert(xhr.responseText);
                ShowCommentMsg("抱歉！评论提交失败！请与管理员联系。");
                $("#span_comment_posted").html('');  
            }
        });
    }

        
    function SubscribeComment(){
        var entryId = 467688;
        var blogId = 1769;
        $("#ctl05_lnkSubscribe").html("<span style='color:red'>订阅操作中...</span>");
        AjaxPost("/ws/CommentService.asmx/SubscribeComment","{entryId:"+entryId+",blogId:"+blogId+"}",OnSubscribeSuccess);
        return false;
    }
    
    function OnSubscribeSuccess(response){
        if(response){
            $("#ctl05_lnkSubscribe").html("<span style='color:red'>订阅成功</span>");
            $("#ctl05_lnkSubscribe").removeAttr("href");
            $("#ctl05_lnkSubscribe").removeAttr("onclick");
        }
        else{
            $("#ctl05_lnkSubscribe").html("<span style='color:red'>订阅失败</span>");
        }
    }
    
   function CancelCommentSubscribe(){
        var entryId = 467688;
        $("#ctl05_lnkSubscribe").html("<span style='color:red'>取消操作中...</span>");
        AjaxPost("/ws/CommentService.asmx/CancelCommentSubscribe","{entryId:"+entryId+"}",OnCancelSubscribeSuccess);
        return false;
    }
    
    function OnCancelSubscribeSuccess(response){
        if(response){
            $("#ctl05_lnkSubscribe").html("<span style='color:red'>取消成功</span>");
                        $("#ctl05_lnkSubscribe").removeAttr("href");
            $("#ctl05_lnkSubscribe").removeAttr("onclick");
        }
        else{
            $("#ctl05_lnkSubscribe").html("<span style='color:red'>取消操作失败</span>");
        }
    }

    
</SCRIPT>

<DIV class=commentform id=comment_form>
<DIV id=divCommentShow></DIV>
<DIV id=comment_nav style="TEXT-ALIGN: right"><SPAN 
id=span_refresh_tips></SPAN><A id=lnk_RefreshComments 
onclick="return RefreshCommentList(467688);" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html###" 
name=commentform>刷新评论列表</A>&nbsp; <A onclick="return RefreshPage();" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html###">刷新页面</A>&nbsp; 
<A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#top">返回页首</A></DIV>
<DIV id=commentform_title>发表评论 <SPAN class=ad_commentbox_up><A 
href="http://www.cnblogs.com/" target=_blank>博客园首页</A>&nbsp; <A 
href="http://news.cnblogs.com/" target=_blank>IT新闻</A>&nbsp; <A 
href="http://home.cnblogs.com/ing/" target=_blank>闪存</A>&nbsp; <A 
href="http://job.cnblogs.com/" target=_blank>招聘</A>&nbsp; <A 
href="http://space.cnblogs.com/q/" target=_blank>博问</A></SPAN></DIV><SPAN 
id=tip_comment style="COLOR: red"></SPAN>
<P>昵称：<INPUT class=author id=ctl05_tbCommentAuthor disabled value=董玲 
name=ctl05$tbCommentAuthor> </P>
<P>主页：<INPUT class=url id=ctl05_tbCommentAuthorUrl disabled 
value=http://www.cnblogs.com/dlring/ name=ctl05$tbCommentAuthorUrl> </P>
<P></P>
<DIV class=commentbox_title>
<DIV class=commentbox_title_left>评论内容： <A href="http://space.cnblogs.com/q/" 
target=_blank>博客园程序员问答平台</A></DIV>
<DIV class=commentbox_title_right><IMG class=comment_icon id=ubb_quote 
title=添加引用 onclick="insertUBB('tbCommentBody','quote')" alt=引用 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/quote.gif"> <IMG 
class=comment_icon id=ubb_bold title=添加粗体 
onclick="insertUBB('tbCommentBody','b')" alt=粗体 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/b.png"> <IMG 
class=comment_icon id=ubb_url title=添加链接 onclick="insertUbbUrl('tbCommentBody')" 
alt=链接 src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/lk.png"> <IMG 
class=comment_icon id=ubb_indent title=添加首行缩进 
onclick="insertIndent('tbCommentBody')" alt=缩进 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/indent.png"> <IMG 
class=comment_icon id=ubb_img title=添加图片 onclick="insertUbbImg('tbCommentBody')" 
alt=图片 src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/img.gif"> <IMG 
class=comment_icon id=ubb_code title=添加代码 onclick=insertUbbCode() alt=代码 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/InsertCode.gif"> </DIV></DIV>
<DIV class=clear></DIV><TEXTAREA class=comment_textarea id=tbCommentBody onkeydown="return clt_enter(event)"></TEXTAREA> 

<P></P>
<P><INPUT class=comment_btn id=btn_comment_submit onclick="PostComment();return false;" type=button value=提交> 
&nbsp;&nbsp;<SPAN id=span_comment_canceledit style="DISPLAY: none"><A 
onclick="return CancelCommentEdit()" 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html###">不改了</A>&nbsp;&nbsp;</SPAN><A 
onclick="return confirm('确认注销吗？')" 
href="http://passport.cnblogs.com/logout.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2frenrenqq%2farchive%2f2006%2f08%2f04%2f467688.html%3flogout%3d1%23commentform">注销</A>&nbsp;&nbsp;<A 
id=ctl05_lnkSubscribe title=邮件订阅回复通知 onclick="return SubscribeComment();" 
href="http://www.cnblogs.com/UI/Controls/#%23%23">订阅回复</A> </P>
<P>[使用Ctrl+Enter键快速提交] </P>
<DIV style="DISPLAY: none"><SPAN id=comment_edit_id></SPAN><SPAN 
id=span_parentcomment_id>0</SPAN> <SPAN id=span_parent_id>467688</SPAN> <SPAN 
id=span_comment_replyto></SPAN><SPAN 
id=span_comment_title>NHibernate的Session管理</SPAN> <SPAN 
id=span_comment_posted></SPAN></DIV>
<DIV class="itnews c_ad_block">推荐链接：<BR><A class=site_hot 
href="http://job.cnblogs.com/offer/8237/" 
target=_blank>沪江网诚聘中高级.NET程序员</A><BR><A 
href="http://job.cnblogs.com/offer/8301/" 
target=_blank>英孚教育诚聘.NET开发工程师</A><BR><A 
href="http://www.cnblogs.com/cmt/archive/2010/06/08/1753881.html" 
target=_blank>购买博客园2010T恤，留下2010年的纪念</A><BR><A 
href="http://space.cnblogs.com/q/" target=_blank>博客园程序员技术问答平台</A><BR><A 
href="http://news.cnblogs.com/" target=_blank>IT新闻</A>:<BR>· <A 
href="http://news.cnblogs.com/n/69344/" target=_blank>从搜索到分享： 社交时代，Google 
如何延续辉煌</A><BR>· <A href="http://news.cnblogs.com/n/69342/" 
target=_blank>金错刀对话周鸿祎：红衣大炮与“微创新”</A><BR>· <A 
href="http://news.cnblogs.com/n/69341/" target=_blank>Google 为政府发布 Google Apps 
for Government，服务器全部位于美国本土</A><BR>· <A href="http://news.cnblogs.com/n/69340/" 
target=_blank>甲骨文CEO当选薪酬之王 十年入账18.4亿美元</A><BR>· <A 
href="http://news.cnblogs.com/n/69339/" 
target=_blank>谷歌与中国两大广告代理商解除合同</A><BR></DIV>
<DIV class=c_ad_block>
<DIV style="MARGIN-TOP: 5px">
<SCRIPT type=text/javascript>
    if (c_enable_dfp) {
        try {
            GA_googleFillSlot("cnblogs_blogpost_bottom");
        }
        catch (e) { }
    }
</SCRIPT>
</DIV>
<DIV class="itnews c_ad_block" id=job_block><A title=程序员知识库 
href="http://kb.cnblogs.com/" target=_blank><B>知识库最新文章</B></A>:<BR>
<DIV id=kb_recent><A href="http://kb.cnblogs.com/page/69316/" target=_blank>【译】 
MongoDB 入门教程</A><BR><A href="http://kb.cnblogs.com/page/69325/" 
target=_blank>couchDB小全</A><BR><A href="http://kb.cnblogs.com/page/69345/" 
target=_blank>WPF 员工卡条形码</A><BR><A href="http://kb.cnblogs.com/page/68896/" 
target=_blank>现有ASP.NET MVC框架应用巧妙移植到手机</A><BR><A 
href="http://kb.cnblogs.com/page/69295/" 
target=_blank>C#中访问私有成员</A><BR></DIV></DIV></DIV>
<DIV class=c_ad_block><A href="http://www.feifanit.com.cn/productFlow.htm" 
target=_blank><IMG alt="" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/e8_net_468x60.gif"></A> </DIV>
<DIV class=c_ad_block id=site_nav_under>网站导航：<BR><A 
href="http://www.cnblogs.com/" target=_blank>博客园首页</A> &nbsp;<A 
href="http://news.cnblogs.com/" target=_blank>IT新闻</A> &nbsp;<A 
href="http://home.cnblogs.com/" target=_blank>个人主页</A> &nbsp;<A 
href="http://home.cnblogs.com/ing/" target=_blank>闪存</A> &nbsp;<A 
href="http://job.cnblogs.com/" target=_blank>程序员招聘</A> &nbsp;<A 
href="http://space.cnblogs.com/" target=_blank>社区</A> &nbsp;<A 
href="http://space.cnblogs.com/q/" target=_blank>博问</A> </DIV>
<DIV class=c_ad_block id=ad_under_comment2><A 
href="http://www.china-pub.com/STATIC07/1005/zh_loving_100528.asp" 
target=_blank><IMG 
style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" 
alt="" 
src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/china_pub_20100610.gif"></A><BR><A 
href="http://www.china-pub.com/itbook/" target=_blank>China-pub 
计算机图书网上专卖店！6.5万品种2-8折！</A><BR><A 
href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" 
target=_blank>China-Pub 计算机绝版图书按需印刷服务</A><BR></DIV>
<DIV class=c_ad_block id=div_commentbox_nav>链接：<A 
href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html?switchskin=1#skinlist">切换模板</A><BR></DIV>
<DIV id=relative_search><BR><B>相关搜索:</B><BR><A 
href="http://zzk.cnblogs.com/s?w=NHibernate" target=_blank>NHibernate</A> </DIV>
<DIV id=kb_link><BR><B>最简洁阅读版式：</B><BR><A 
href="http://archive.cnblogs.com/a/467688/">NHibernate的Session管理</A></DIV></DIV></DIV>
<DIV id=leftcontent style="DISPLAY: none">
<DIV id=leftcontentcontainer><!--done-->
<DIV class=newsItem>
<TABLE width=200 border=0>
  <TBODY>
  <TR>
    <TD align=left>只有偏执狂才能生存。</TD></TR>
  <TR>
    <TD align=left>教堂尖项上的风标，即使由钢铁制成，如果不懂得顺应风势的艺术，一样会被暴风立即摧毁。</TD></TR>
  <TR>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD align=left><STRONG>原创</STRONG>技术文章，<STRONG>转载</STRONG>请注明来源。</TD></TR>
  <TR>
    <TD>&nbsp;</TD></TR></TBODY></TABLE>
<DIV id=profile_block>粉丝 - 3<BR>关注 - 0<BR><A 
href="http://home.cnblogs.com/renrenqq/" target=_blank>我的主页</A>&nbsp; <A 
href="http://home.cnblogs.com/renrenqq/detail/" target=_blank>个人资料</A><BR><A 
href="http://home.cnblogs.com/renrenqq/ing/" target=_blank>我的闪存</A>&nbsp; <A 
href="http://space.cnblogs.com/msg/send/DDL" target=_blank>发短消息</A></DIV></DIV>
<TABLE class=Cal id=Calendar1_entryCal title=Calendar 
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; BORDER-COLLAPSE: collapse" 
cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TD style="BACKGROUND-COLOR: silver" colSpan=7>
      <TABLE class=CalTitle style="WIDTH: 100%; BORDER-COLLAPSE: collapse" 
      cellSpacing=0 border=0>
        <TBODY>
        <TR>
          <TD class=CalNextPrev style="WIDTH: 15%"><A 
            title="Go to the previous month" style="COLOR: black" 
            href="javascript:__doPostBack('Calendar1$entryCal','V2373')">&lt;</A></TD>
          <TD style="WIDTH: 70%" align=middle>2006年8月</TD>
          <TD class=CalNextPrev style="WIDTH: 15%" align=right><A 
            title="Go to the next month" style="COLOR: black" 
            href="javascript:__doPostBack('Calendar1$entryCal','V2435')">&gt;</A></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TH class=CalDayHeader scope=col align=middle abbr=日>日</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=一>一</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=二>二</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=三>三</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=四>四</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=五>五</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=六>六</TH></TR>
  <TR>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>30</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>31</TD>
    <TD style="WIDTH: 14%" align=middle>1</TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/2.html"><U>2</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/3.html"><U>3</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/4.html"><U>4</U></A></TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>5</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>6</TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/7.html"><U>7</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/8.html"><U>8</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/9.html"><U>9</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/10.html"><U>10</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/11.html"><U>11</U></A></TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>12</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>13</TD>
    <TD style="WIDTH: 14%" align=middle>14</TD>
    <TD style="WIDTH: 14%" align=middle>15</TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/16.html"><U>16</U></A></TD>
    <TD style="WIDTH: 14%" align=middle>17</TD>
    <TD style="WIDTH: 14%" align=middle>18</TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>19</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>20</TD>
    <TD style="WIDTH: 14%" align=middle>21</TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/22.html"><U>22</U></A></TD>
    <TD style="WIDTH: 14%" align=middle><A 
      href="http://www.cnblogs.com/renrenqq/archive/2006/8/23.html"><U>23</U></A></TD>
    <TD style="WIDTH: 14%" align=middle>24</TD>
    <TD style="WIDTH: 14%" align=middle>25</TD>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>26</TD></TR>
  <TR>
    <TD class=CalWeekendDay style="WIDTH: 14%" align=middle>27</TD>
    <TD style="WIDTH: 14%" align=middle>28</TD>
    <TD style="WIDTH: 14%" align=middle>29</TD>
    <TD style="WIDTH: 14%" align=middle>30</TD>
    <TD style="WIDTH: 14%" align=middle>31</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>1</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>2</TD></TR>
  <TR>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>3</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>4</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>5</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>6</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>7</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" align=middle>8</TD>
    <TD class=CalOtherMonthDay style="WIDTH: 14%" 
align=middle>9</TD></TR></TBODY></TABLE><BR>
<DIV id=side_ing_block>
<H3 class=catListTitle>最新闪存</H3>
<UL>
  <LI>原来酱油的酱字很多人都写不出来，当然也包括我 <A class=ing_lnk 
  href="http://home.cnblogs.com/ing/113206/">07-15 16:46</A>
  <LI>Programming is fun When the work is done if you wanna make your work also 
  fun: use Python! <A class=ing_lnk 
  href="http://home.cnblogs.com/ing/112751/">07-13 13:40</A>
  <LI>简明 Python 教程,<A class=gray 
  title=http://linux.chinaitlab.com/manual/Python_chinese/index.html 
  href="http://linux.chinaitlab.com/manual/Python_chinese/index.html" 
  target=_new>linux.chinaitlab.com...</A> <A class=ing_lnk 
  href="http://home.cnblogs.com/ing/112607/">07-12 17:03</A>
  <LI>翻墙已经成了程序员必备的生存技能 <A class=ing_lnk 
  href="http://home.cnblogs.com/ing/112560/">07-12 14:10</A>
  <LI>Python找谁惹谁了，伟大的防火墙无处不在啊 <A class=ing_lnk 
  href="http://home.cnblogs.com/ing/112559/">07-12 14:10</A>
  <LI><A class=ing_lnk 
  href="http://home.cnblogs.com/renrenqq/ing/">更多闪存...</A></LI></UL></DIV>
<SCRIPT type=text/javascript>
var blogapp = 'renrenqq';
</SCRIPT>

<DIV class=mySearch>
<H3 class=catListTitle>搜索</H3>
<DIV class=div_my_zzk><INPUT class=input_my_zzk id=q 
onkeydown="return zzk_go_enter(event);">&nbsp;<INPUT class=btn_my_zzk id=btnZzk onclick=zzk_go() type=button value=找找看></DIV>
<DIV class=div_my_zzk><INPUT class=input_my_zzk id=google_q 
onkeydown="return google_go_enter(event)" name=google_q>&nbsp;<INPUT class=btn_my_zzk onclick=google_go() type=button value=谷歌搜索></DIV></DIV>
<H3>常用链接</H3>
<UL>
  <LI><A id=SingleColumn1_ctl03_rptMainLinks_ctl00_lnkLinkItem 
  href="http://www.cnblogs.com/renrenqq/MyPosts.html">我的随笔</A> 
  <LI><A id=SingleColumn1_ctl03_rptMainLinks_ctl01_lnkLinkItem 
  href="http://home.cnblogs.com/renrenqq/">我的空间</A> 
  <LI><A id=SingleColumn1_ctl03_rptMainLinks_ctl02_lnkLinkItem 
  href="http://space.cnblogs.com/msg/recent">我的短信</A> 
  <LI><A id=SingleColumn1_ctl03_rptMainLinks_ctl03_lnkLinkItem 
  href="http://www.cnblogs.com/renrenqq/MyComments.html">我的评论</A> 
  <LI><A id=itemListLink 
  onclick="this.blur();WarpClass('itemListLink', 'itemListLin_con');return false;" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">更多链接</A> 
  </LI></UL>
<DIV id=itemListLin_con style="DISPLAY: none">
<UL>
  <LI><A id=SingleColumn1_ctl03_repeaterLinks_ctl01_lnkLinkItem title=我发表过评论的随笔 
  href="http://www.cnblogs.com/renrenqq/OtherPosts.html">我的参与</A> 
  <LI><A id=SingleColumn1_ctl03_repeaterLinks_ctl02_lnkLinkItem 
  href="http://www.cnblogs.com/renrenqq/MyNews.html">我的新闻</A> 
  <LI><A id=SingleColumn1_ctl03_repeaterLinks_ctl03_lnkLinkItem 
  href="http://www.cnblogs.com/renrenqq/RecentComments.html">最新评论</A> 
  <LI><A id=SingleColumn1_ctl03_repeaterLinks_ctl04_lnkLinkItem 
  href="http://www.cnblogs.com/renrenqq/tag/">我的标签</A> </LI></UL></DIV>
<H3 class=catListTitle>我参与的团队</H3>
<DIV class=RecentComment>
<UL style="WORD-BREAK: break-all">
  <LI><A id=SingleColumn1__1dc7eda_TeamList_ctl01_lnkTeam 
  href="http://www.cnblogs.com/team/DesignPattern/">Design &amp; 
  Pattern团队(0/0)</A> 
  <LI><A id=SingleColumn1__1dc7eda_TeamList_ctl02_lnkTeam 
  href="http://www.cnblogs.com/team/SHDotNetClub/">上海.NET俱乐部(0/0)</A> 
  <LI><A id=SingleColumn1__1dc7eda_TeamList_ctl03_lnkTeam 
  href="http://www.cnblogs.com/team/GZDotNetClub/">广州.NET俱乐部(0/0)</A> 
  <LI><A id=SingleColumn1__1dc7eda_TeamList_ctl04_lnkTeam 
  href="http://www.cnblogs.com/team/nanchang/">南昌.net俱乐部(QQ群:58442432)(0/0)</A> 
  <LI><A id=SingleColumn1__1dc7eda_TeamList_ctl05_lnkTeam 
  href="http://www.cnblogs.com/team/ORMapping/">O/R Mapping团队(0/0)</A> 
</LI></UL></DIV>
<H3 class=catListTitle>随笔分类<SPAN 
style="FONT-WEIGHT: normal; FONT-SIZE: 11px">(86)</SPAN></H3>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_Link 
  href="http://www.cnblogs.com/renrenqq/category/2446.html">.NET(11)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/2446.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_Link 
  href="http://www.cnblogs.com/renrenqq/category/65499.html">Asp.net(5)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/65499.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_Link 
  href="http://www.cnblogs.com/renrenqq/category/39891.html">NHibernate(29)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/39891.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_Link 
  href="http://www.cnblogs.com/renrenqq/category/64888.html">Office编程(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/64888.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_Link 
  href="http://www.cnblogs.com/renrenqq/category/253126.html">Python(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/253126.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_Link 
  href="http://www.cnblogs.com/renrenqq/category/59196.html">XML</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/59196.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_Link 
  href="http://www.cnblogs.com/renrenqq/category/2452.html">编程其他(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/2452.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_Link 
  href="http://www.cnblogs.com/renrenqq/category/9321.html">代码生成(4)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl08_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/9321.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl09_Link 
  href="http://www.cnblogs.com/renrenqq/category/5444.html">读书笔记(6)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl09_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/5444.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl10_Link 
  href="http://www.cnblogs.com/renrenqq/category/64525.html">规范文档(1)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl10_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/64525.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl11_Link 
  href="http://www.cnblogs.com/renrenqq/category/66465.html">设计(架构)模式(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl11_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/66465.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl12_Link 
  href="http://www.cnblogs.com/renrenqq/category/64892.html">思考和感悟(4)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl12_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/64892.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl13_Link 
  href="http://www.cnblogs.com/renrenqq/category/2453.html">随便写写(17)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl13_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/2453.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl14_Link 
  href="http://www.cnblogs.com/renrenqq/category/67264.html">团队管理(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl14_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/67264.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl15_Link 
  href="http://www.cnblogs.com/renrenqq/category/59195.html">正则表达式(2)</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl15_RssLink 
  onclick="return open_link('http://www.cnblogs.com/renrenqq/category/59195.html/rss');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 
  </LI></UL>
<H3 class=catListTitle>project</H3>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_Link 
  onclick="return open_link('http://www.codeplex.com/AppArchGuide');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">patterns 
  &amp; practices Application Architecture Guide</A> </LI></UL>
<H3 class=catListTitle>友情博客</H3>
<UL class=catList>
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl01_Link 
  onclick="return open_link('http://ericgqs.cnblogs.com/');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#" 
  target=_blank>eric_gqs</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl02_Link 
  onclick="return open_link('http://www.cnblogs.com/jillzhang/');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">Robin's 
  Space</A> 
  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_Link 
  onclick="return open_link('http://pw.cnblogs.com/');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">SHY520</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl03_RssLink 
  onclick="return open_link('http://pw.cnblogs.com/rss.aspx');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_Link 
  onclick="return open_link('http://www.cnblogs.com/Terrylee');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">Terrylee</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl04_RssLink 
  onclick="return open_link('http://www.cnblogs.com/Terrylee/Rss.aspx');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 

  <LI class=catListItem><A class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl05_Link 
  onclick="return open_link('http://linfuguo.cnblogs.com/');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#">林子</A><A 
  class=listitem 
  id=SingleColumn1_Categories_CatList_ctl02_LinkList_ctl05_RssLink 
  onclick="return open_link('http://linfuguo.cnblogs.com/rss.aspx');" 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/04/467688.html#"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  src="E:\softs\Develop Tools\NHibernate\Sample\GoogleCodeSVN\Doc\Article\NHibernate的Session管理 - DDLLY命名空间 - 博客园_files\xml(1).gif"></A> 
  </LI></UL>
<H3>积分与排名</H3>
<UL>
  <LI>积分 - 258494 
  <LI>排名 - 233 </LI></UL>
<H3 class=catListTitle>最新随笔</H3>
<DIV class=RecentComment id=RecentPosts>
<UL style="WORD-BREAK: break-all">
  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl00_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/07/12/1775625.html">1.&nbsp;如何在windows下安装"The 
  Eric Python IDE"</A> 
  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl01_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/07/01/1768917.html">2.&nbsp;一个新的轮回，一个新的开始</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl02_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/06/30/1768073.html">3.&nbsp;一名英格兰球迷眼里的本届英格兰队</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl03_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/484216.html">4.&nbsp;用我的MyGeneration模板生成NHibernate映射文件和关系(one-to-one,one-to-many,many-to-many)</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl03_RecentPostsList2_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/483988.html">5.&nbsp;强大的代码生成工具MyGeneration</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl04_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/22/483216.html">6.&nbsp;请帮'Atlas'起个名字</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl05_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/16/478198.html">7.&nbsp;NHibernate的关联映射(one-to-one,one-to-many,many-to-many)以及cascade分析</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl06_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/11/474448.html">8.&nbsp;特里当选英格兰队新任队长</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl07_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/10/473650.html">9.&nbsp;发疯的live.com</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl08_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/09/471820.html">10.&nbsp;NHibernate的Q&amp;A（持续更新）</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl08_RecentPostsList2_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/09/471788.html">11.&nbsp;NHibernate的调试技巧和Log4Net配置</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl09_RecentPostsList2_ctl00_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/08/470946.html">12.&nbsp;诚邀博客链接</A> 

  <LI><A 
  id=SingleColumn1_ctl07_RecentPostsList_ctl09_RecentPostsList2_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/08/470916.html">13.&nbsp;推荐两款在线日程（任务）管理的站点</A> 
  </LI></UL></DIV>
<H3 class=catListTitle>最新评论</H3>
<DIV class=RecentComment id=RecentComments>
<UL>
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/07/01/1768917.html#1869586">1.&nbsp;Re:一个新的轮回，一个新的开始</A> 

  <LI>多谢支持，不知道你想看到关于哪方面的东西，大家一起交流 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--DDL 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl02_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/07/01/1768917.html#1869473">2.&nbsp;Re:一个新的轮回，一个新的开始</A> 

  <LI>支持博主,多写点给新手的建议,我一定常来顶,呵呵~ 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--张三~ 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl03_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/08/470946.html#1861311">3.&nbsp;Re:诚邀博客链接</A> 

  <LI>@jillzhang 加好了 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--DDL 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl04_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2004/07/06/21603.html#1851191">4.&nbsp;Re:再论属性可以变成方法---C#中使用new关键字隐藏成员</A> 

  <LI>@lostinet 感谢分享 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--skyaspnet 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl05_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2004/08/31/37986.html#1842274">5.&nbsp;Re:自动代码生成器</A> 

  <LI>可不可以帮我找一份用Java编写的自动注册器的代码。谢谢。找到的话给我发过来吧。邮箱是：xiangyouwen723700@163.com] 
  非常感谢！ 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--JohnXiang 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl06_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/11/24/283757.html#1841771">6.&nbsp;Re:NHibernate翻译文档提供下载（chm和html格式）</A> 

  <LI>没有Nhibrnate的增、删、改和查询的内容 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--亲趴趴熊 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl07_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/483988.html#1837006">7.&nbsp;Re:强大的代码生成工具MyGeneration</A> 

  <LI>好好学习一下，真的不错～ 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--yangyueming 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl08_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/16/478198.html#1740824">8.&nbsp;Re:NHibernate的关联映射(one-to-one,one-to-many,many-to-many)以及cascade分析</A> 

  <LI>另外代码不能下载 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--蓝天_白云 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl09_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/16/478198.html#1740823">9.&nbsp;Re:NHibernate的关联映射(one-to-one,one-to-many,many-to-many)以及cascade分析</A> 

  <LI>非常好的入门资料 学习了 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--蓝天_白云 
  <LI><A id=SingleColumn1__300cbd0_CommentList_ctl10_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/484216.html#1711802">10.&nbsp;Re:用我的MyGeneration模板生成NHibernate映射文件和关系(one-to-one,one-to-many,many-to-many)</A> 

  <LI>请问下，我用了楼主你的方法去生成映射文件，为什么在输出路径中找不到那些文件呢 
  <LI style="MARGIN-RIGHT: 4px; TEXT-ALIGN: right">--起步者 </LI></UL></DIV>
<H3 class=catListTitle>阅读排行榜</H3>
<DIV class=RecentComment id=TopViewPosts>
<UL style="WORD-BREAK: break-all">
  <LI><A id=SingleColumn1_ctl09_TopList_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/11/24/283757.html">1.&nbsp;NHibernate翻译文档提供下载（chm和html格式）(26719)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl02_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/483988.html">2.&nbsp;强大的代码生成工具MyGeneration(18087)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl03_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/484216.html">3.&nbsp;用我的MyGeneration模板生成NHibernate映射文件和关系(one-to-one,one-to-many,many-to-many)(12037)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl04_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/16/478198.html">4.&nbsp;NHibernate的关联映射(one-to-one,one-to-many,many-to-many)以及cascade分析(11237)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl05_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/12/12/295712.html">5.&nbsp;NHibernate快速起步(11017)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl06_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2004/08/31/37986.html">6.&nbsp;自动代码生成器(7175)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl07_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/09/471788.html">7.&nbsp;NHibernate的调试技巧和Log4Net配置(7029)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl08_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/03/466636.html">8.&nbsp;有关NHibernate的问题请在此提出(6729)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl09_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/11/22/282195.html">9.&nbsp;NHibernate文档翻译完成(6190)</A> 

  <LI><A id=SingleColumn1_ctl09_TopList_ctl10_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2004/06/11/14999.html">10.&nbsp;.NET中统一的存储过程调用方法(收藏)(6157)</A> 
  </LI></UL></DIV>
<H3 class=catListTitle>评论排行榜</H3>
<DIV class=RecentComment id=TopCommentsPosts>
<UL style="WORD-BREAK: break-all">
  <LI><A id=SingleColumn1_ctl10_TopList_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/11/24/283757.html">1.&nbsp;NHibernate翻译文档提供下载（chm和html格式）(130)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl02_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/03/466636.html">2.&nbsp;有关NHibernate的问题请在此提出(84)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl03_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/07/20/455519.html">3.&nbsp;有追求的程序员是痛苦的吗？(76)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl04_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/484216.html">4.&nbsp;用我的MyGeneration模板生成NHibernate映射文件和关系(one-to-one,one-to-many,many-to-many)(52)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl05_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/12/12/295712.html">5.&nbsp;NHibernate快速起步(38)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl06_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2004/08/31/37986.html">6.&nbsp;自动代码生成器(31)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl07_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/09/471820.html">7.&nbsp;NHibernate的Q&amp;A（持续更新）(27)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl08_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/23/483988.html">8.&nbsp;强大的代码生成工具MyGeneration(26)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl09_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2005/11/22/282195.html">9.&nbsp;NHibernate文档翻译完成(25)</A> 

  <LI><A id=SingleColumn1_ctl10_TopList_ctl10_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2006/08/02/466056.html">10.&nbsp;NHibernate的灵活配置(23)</A> 
  </LI></UL></DIV>
<H3 class=catListTitle>60天内阅读排行</H3>
<DIV class=RecentComment>
<UL>
  <LI><A id=SingleColumn1__97f221_TopList_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/07/12/1775625.html">1.&nbsp;如何在windows下安装"The 
  Eric Python IDE"(170)</A> 
  <LI><A id=SingleColumn1__97f221_TopList_ctl02_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/06/30/1768073.html">2.&nbsp;一名英格兰球迷眼里的本届英格兰队(69)</A> 

  <LI><A id=SingleColumn1__97f221_TopList_ctl03_Hyperlink1 
  href="http://www.cnblogs.com/renrenqq/archive/2010/07/01/1768917.html">3.&nbsp;一个新的轮回，一个新的开始(49)</A> 
  </LI></UL></DIV></DIV></DIV><!--done-->
<DIV class=footer>Powered by: <A href="http://www.cnblogs.com/">博客园</A> 模板提供：<A 
href="http://blog.hjenglish.com/">沪江博客</A> Copyright ©2010 DDL </DIV></FORM>
<SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/shCore.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/shLanguage.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
        try {
            SyntaxHighlighter.config.clipboardSwf = 'http://common.cnblogs.com/flash/clipboard.swf';
            SyntaxHighlighter.all();
        } catch (e) { }
    </SCRIPT>

<SCRIPT src="NHibernate的Session管理 - DDLLY命名空间 - 博客园_files/ShowHidden.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </SCRIPT>

<SCRIPT type=text/javascript>
        try {
            var pageTracker = _gat._getTracker("UA-476124-1");
            pageTracker._trackPageview();
        } catch (err) { }</SCRIPT>
</BODY></HTML>
